![]() |
|
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
|
||||
|
||||
Getting a list of all server properties
If an STV is running as a client, extender, or placeshifter, is there a way to get a list of all the properties on the server? I'm not talking about GetServerProperty() since that assumes you know what property you are looking for. I need a way to get ALL of the properties without knowing them in advance.
To get the local properties I can just use java to open the local SageClient.properties or MAC.properties file and read it. Is there a way to read the Sage.properties file from a remote UI? Thanks, Tom
__________________
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. |
#2
|
||||
|
||||
Reading directly from the file (either locally or remotely) seems like bad practice while Sage has it open. Using the SageTv API would be better.
You could try calling Get[Server]SubpropertiesThatAreLeaves("") and/or Get[Server]SubpropertiesThatAreBranches("") with the empty string as an argument. But why do you need them all? Wouldn't it be sufficient to prefix your properties with some unique prefix, and use the above methods to query just your sub-space of the property space?
__________________
-- Greg |
#3
|
||||
|
||||
Greg,
I saw those API's but hadn't considered calling them with a "". Thanks, I'll give it a whirl. I was just trying some experiments with the .properties file. I know it's not very smart to read the file while Sage has it open so I will be looking for a better way to achieve what I need. Thanks, Tom
__________________
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. |
#4
|
|||
|
|||
Quote:
|
#5
|
|||
|
|||
ortus has a method for this for getting regular properties... not server ones.. it should be fairly easy to modify to get the server properties..
it returns all properties in an ArrayList that are children of parentprop. Code:
public static ArrayList GetPropertyAndChildren(String parentprop){ ArrayList props = new ArrayList(); String[] branches = GetSubpropertiesThatAreBranches(parentprop); String[] leaves = GetSubpropertiesThatAreLeaves(parentprop); for (String s : branches){ props.addAll(GetPropertyAndChildren(parentprop.concat("/").concat(s))); } for (String s : leaves){ String propadd = parentprop.concat("/").concat(s); props.add(propadd); } return props; }
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer |
#6
|
||||
|
||||
Plucky, I'm looking at ways to be able to change/delete/add properties from within the STV. So it's really a universal property editor.
razr, That works fine but you need to know the parent properties, which I don't. I tried Greg's idea of passing those API's "" as a parent and I do get all of the leaves and branches, but they do not include the actual parent. (So asdf/qwer gives me qwer with no way to tell what the parent is.) So far I haven't come up with a good way to get all of the properties for servers, extenders, clients, or placeshifters.
__________________
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. |
#7
|
||||
|
||||
Tom,
Configuration.GetSubpropertiesThatAreLeaves("") should return the top level properties (ie, the ones without a parent), and GetSubpropertiesThatAreBranches("") should return the top level branches. Using those 2 apis you should be able to build the properties. I just ran a quick test on my environment, and it does appear to work. So calling razr's function above with "" as the parent should give the complete props, I would think.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#8
|
||||
|
||||
Oh, now I see what you are all saying. I misuderstood how these API's worked but now I see.
Thanks. This makes my life much easier. Tom
__________________
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:
- Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#10
|
||||
|
||||
Quote:
- Get off couch - Go to a PC - Shutdown Sage - Edit properties file - Restart Sage - Go back to couch I want an easy way to stay on the couch, edit property, restart Sage. ![]() I fully realize I'll have lots of rope to hang myself, crash Sage, increase global warming, etc. by messing with the properties while Sage is running.
__________________
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. |
#11
|
||||
|
||||
Oh, and by "not all properties can be changed while SageTV is running", I mean that there are lots that will reset to their value from when SageTV started when SageTV exits regardless of having set them via the SetProperty() call while SageTV was running - these are values not intended to be dynamic. And, no, I don't have a list; if you change it & it makes no difference, that's one of them. I just wanted to make sure you understood this.
- Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#12
|
||||
|
||||
Quote:
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#13
|
||||
|
||||
I've got several laptops and THEY are what I want to ditch
![]()
__________________
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. |
#14
|
||||
|
||||
Quote:
I often find myself at an extender testing things and this will make it easier for me to run certain test cases by forcing properties to be what I need them to be. Tom
__________________
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. |
#15
|
||||
|
||||
I'd say any property you use in something you create should be able to be manipulated from in the STVi. There's nothing more frustrating than having to close down sage, just to change a setting, especially if what that setting does doesn't require a restart. (as I'm sure you are aware).
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#16
|
||||
|
||||
My situation is that I often put in "hidden" properties to control things like debugging. I don't want to expose these in the STV, but I would like to manipulate them and check their values while testing.
If there's any general interest in in this I'll release it as an STVi. Tom
__________________
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. |
#17
|
||||
|
||||
Quote:
Instead of exposing all properties, why not use a config file to specify (possibly with wildcards) which properties you want to be able to edit in this way? That would be safer and arguably more useful than an unfiltered list of everything that you have to scroll though to find the ones you want to change, while being careful not to touch the wrong ones.
__________________
-- Greg |
#18
|
|||
|
|||
the code snippet that i posted will return all the children of a given property... you could easily write an overloaded function that accepts an array of parents and call that code snippit multiple times to build up a list of properties from different parents...
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer |
#19
|
||||
|
||||
Quote:
I would not release it as an STVi for "general consumption". I will simply make it available (by request) to developers who would like to use it. It's WAY too dangerous to post as a general STVi. ![]() Tom
__________________
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) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Current Properties List? | MeInMaui | SageTV Software | 1 | 05-03-2007 11:37 PM |
Difference between SageClient.properties and Sage.properties? | morfinx | SageTV Software | 1 | 12-30-2006 09:01 AM |
How to remove server properties ? | dflachbart | SageTV Studio | 3 | 11-06-2006 07:06 PM |
When are the Win.bin, Win.bak, Sage.properties, and Sage.properties.autobackup saved? | zubblwump | SageTV Software | 3 | 01-16-2005 08:54 AM |
More Upto date customisable properties list | danward79 | SageTV Software | 0 | 01-02-2004 11:11 AM |