SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-23-2010, 11:39 AM
chrishallowell chrishallowell is offline
Sage Advanced User
 
Join Date: Jan 2008
Posts: 169
Property files

I'm trying to understand the different property files and how each is set/get.
(I'm using the STVI Configurator plugin if that is relevant.)

From what I gather, there are 3 types of SageTV property files
1. sage.properties
2. sageclient.properties, 1 for each client (includes the client running on the server)
3. client\*.properties, 1 for each extender

Do I have this right?
1. sage.properties can be accessed by any client or extender
2. A client/extender can't access another client/extenders' properties
Or is it this....
1. A STVi must be installed in each client/extender so it only makes sense to store the properties in their own properties file and not in the global one.

How does the plugin manager determine where to save the config values?
(My config values are being saved to sageclient.properties, but I want them saved to sage.properties because they are global settings.)
Reply With Quote
  #2  
Old 08-23-2010, 11:49 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
You are correct. When using get/set property within studio it returns the client/extender properties.

As for the plugin it defaults to the clients property unless you make your own class to define it to get/set the server property. There may be a way to do this by default I am not sure I just made my own class using the sagex IPropertyPersistance method. Not sure if Greg has a way to do this with the STVi configurator or not.
Reply With Quote
  #3  
Old 08-23-2010, 12:11 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by chrishallowell View Post
How does the plugin manager determine where to save the config values?
It doesn't. The plugin manager's job is to present the config UI and accept user input. Your code is responsible for actually saving the values somewhere (and the plugin manager doesn't care where).

In your case (if we're still talking about the same plugin), you've chosen to delegate the task of saving values to XmlConfig, which uses Get/SetProperty, which as you've observed stores them in SageClient.properties when running on a client. The current version of XmlConfig has no provision for forcing server-side property storage.

In nearly all cases, Get/SetProperty is the right choice for plugins. For single-instance Standard plugins installed on the server, this will store the properties globally in Sage.properties. For UI mod plugins running in a client context, it will store them in the client-specific properties file.

You said you want your settings to be global in effect, but that seems to be at odds with the fact that you're implementing your plugin as an STVI, which by definition is a client-side plugin. By convention each Sage client has its own set of UI configuration setttings. Maybe if you said more about what you're trying to do, we could give better advice on where and how to store your settings.
__________________
-- Greg
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
When setting or getting property PLUCKYHD SageTV Studio 19 05-12-2009 03:04 PM
Extender: Different property files are accessed between STV code and Java lib Morgan111 SageTV Studio 1 02-12-2008 08:49 PM
Online Services Property Files ejkeebler SageTV Customizations 2 01-21-2008 01:17 PM
experimental_video_thumbnail_generation property? popechild SageTV Software 7 06-29-2006 05:30 PM
What is this new property? mlbdude SageTV Beta Test Software 22 04-07-2004 09:23 PM


All times are GMT -6. The time now is 01:07 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.