SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

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 03-06-2010, 05:46 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
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.
Reply With Quote
  #2  
Old 03-06-2010, 06:15 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
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
Reply With Quote
  #3  
Old 03-06-2010, 06:21 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
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.
Reply With Quote
  #4  
Old 03-06-2010, 07:50 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by tmiranda View Post
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
Are you looking for a way to have universal properties? (client,server,extender whatever)
Reply With Quote
  #5  
Old 03-06-2010, 09:24 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
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
Reply With Quote
  #6  
Old 03-07-2010, 06:01 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
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.
Reply With Quote
  #7  
Old 03-07-2010, 06:31 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
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.
Reply With Quote
  #8  
Old 03-07-2010, 07:25 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
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.
Reply With Quote
  #9  
Old 03-07-2010, 07:57 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by tmiranda View Post
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.
Just so you understand before writing all this code: not all properties can be changed while SageTV is running.

- 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.
Reply With Quote
  #10  
Old 03-07-2010, 09:52 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by Opus4 View Post
Just so you understand before writing all this code: not all properties can be changed while SageTV is running.

- Andy
Understood. I'm just tired of:
- 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.
Reply With Quote
  #11  
Old 03-07-2010, 12:09 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
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.
Reply With Quote
  #12  
Old 03-07-2010, 02:17 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by tmiranda View Post
Understood. I'm just tired of:
- 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.
You really need a laptop... Or ditch the extenders.. ;-)
__________________
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
Reply With Quote
  #13  
Old 03-07-2010, 02:49 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by Fuzzy View Post
You really need a laptop... Or ditch the extenders.. ;-)
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.
Reply With Quote
  #14  
Old 03-07-2010, 02:53 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by Opus4 View Post
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
Understood. I'm writing the tool mostly to modify properties that relate to things I have wrote or am writing. Sometimes it's a lot easier to dynamically change the property while developing and testing.

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.
Reply With Quote
  #15  
Old 03-07-2010, 03:05 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
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
Reply With Quote
  #16  
Old 03-08-2010, 06:05 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
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.
Reply With Quote
  #17  
Old 03-08-2010, 01:59 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by tmiranda View Post
If there's any general interest in in this I'll release it as an STVi.
I'd be extremely careful about releasing an STVI that gives unrestricted access from within the UI to all property settings -- unless you're prepared to provide support for newbies who use it to hose their systems.

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
Reply With Quote
  #18  
Old 03-08-2010, 02:02 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
Quote:
Originally Posted by GKusnick View Post
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?
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
Reply With Quote
  #19  
Old 03-08-2010, 02:48 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by GKusnick View Post
I'd be extremely careful about releasing an STVI that gives unrestricted access from within the UI to all property settings -- unless you're prepared to provide support for newbies who use it to hose their systems.
Greg,

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.
Reply With Quote
Reply


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

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
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


All times are GMT -6. The time now is 12:57 PM.


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