|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Setting properties that are tested in an STVi
I wrote STVI for a plugin that calls GetProperty(prop, defvalue) to make choices about what to present to the user.
I noticed that currently - using setProperty and setServerProperty in the API from my server plugin both seem to set values in Sage.properties. But the presence of my STVI in the client has led to the properties being recorded in the SageClient.properties with default values. Is it possible to set those client properties from a server plugin? Thanks in advance for any advice! Michael |
#2
|
|||
|
|||
SetServerProperty
And GetServerProperty Will always get and set properties on the server from any client or server. Getproperty And SetProperty Set and get client specific properties |
#3
|
|||
|
|||
Thanks for your help.
May be its because my client and server are on the same laptop. Calling: SageTV.api("SetProperty", new Object[] {property, value}); from my server plugin seems only to result in Sage.properties being set and not SageClient.properties. And hence my STVi is ignoring the properties Michael |
#4
|
|||
|
|||
Quote:
|
#5
|
|||
|
|||
I've changed my STVi to do GetServerProperty instead of GetProperty.
Seems to do the trick for now. Michael |
#6
|
|||
|
|||
SageTV is running as a service.
Michael |
#7
|
||||
|
||||
What are you trying to accomplish here? If these are global settings that apply to all clients, then you should use Get/SetServerProperty to access them. If they're per-client UI option settings, then you should use Get/SetProperty, and your backend server code shouldn't be accessing them at all.
__________________
-- Greg |
#8
|
||||
|
||||
Slightly OT, but I have grown to really like the UserRecordAPI for storing data that needs to be shared among various UI instances.
100% agree that you should use SetProperty for instance specific values and SetServerProperty for values that are shared among all UI instances. Another small gotch with properties, they are all Strings. In most cases the expression evaluator will convert them to the right type, but not all. Something like: Code:
GetProperty("propertyname", defvalue) + 1 Code:
val = GetProperty("propname", defvalue)*1.0 + 1
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#9
|
||||
|
||||
Quote:
My attitude on such things is that if you want to convert a string to an integer, you should say so explicitly by calling parseInt. Relying on obscure multiplication tricks to do the conversion implicitly does not make your code easier to understand.
__________________
-- Greg |
#10
|
||||
|
||||
Quote:
I'm also lazy and have sometimes not followed your good advice and simply multiplied by 1 to do the conversion.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting in Sage.properties for HD-PVR | sdsean | SageTV Software | 6 | 04-21-2010 08:03 PM |
Setting up the Sage.properties file??? | agdm619 | Hardware Support | 12 | 12-26-2008 10:02 AM |
Anyone tested or get Closed Caption working on HD extender | TechBill | SageTV Media Extender | 10 | 04-13-2008 02:38 PM |
newb tested beyond and sage - want sage but video q isnt as good? | elitevsx | SageTV Software | 13 | 01-18-2006 08:45 AM |