![]() |
|
SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github. |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Context names in the API?
There is a text file, I think it is called extenders.properties in the webserver folder, that contains names for all of your extenders that is linked to their MAC IDs.
The web client uses this to show a "friendly" name on the Sage web home page so that it shows "Kitchen" rather than something like 01fd2a364f8. Is there a way to access these names via the API or do you have to read and parse the text file?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
#2
|
|||
|
|||
I don't remember the details, but I thought there was something added to the api in 7.0 or 7.1 that replaced that text file with something in the api so that everyone could use the same aliases. I'd have a look at the webui source code to see if that change was made or if I'm just imagining stuff.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#3
|
||||
|
||||
Quote:
There is a bunch of phoenix.client.* apis that deal with getting and setting ui context names. While these names are originally in the extenders.properties, it was decided some time ago that perhaps it would be better to store them in the Sage.properties as a server property, so the phoenix apis primarily deal with getting and setting the extender name in the server properties. When stored in the Sage.properties, it means that anything can access the names, under the key, sagex/uicontexts/CONTEXTNAME There is also a phoenix.client.LoadWebServerExtenderNames() api that will load the extender properties and return them as a map, so you can get the pretty name, if configured there, using the context name as the key. Either way the phoenix.client.* apis provide access to both ways of getting the "pretty" names.
__________________
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 |
#4
|
|||
|
|||
Thanks Stuckless - so how do the names initially get loaded into the properties file? I see in some of the code that it does read the extenders.properties file. So is the "gold" copy kept in this file and if you change it there it then gets updated in sage.properties?
What happens if someone changes the name through the web server - does the change get immediately propogated back into sage.properties or does that happen when Sage starts up the next time?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
#5
|
||||
|
||||
Quote:
__________________
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 |
#6
|
|||
|
|||
I am getting an error which I think is related to how I am trying to call the Phoenix apis.
This code is failing - the import line is ok so it can find the API but it doesn't like how I am calling it. What prefix do I use for the API class? I have tried client., phoenix.client., and ClientAPI. and none of those two work. Code:
import phoenix.client.* println phoenix.client.LoadWebServerExtenderNames()
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
#7
|
||||
|
||||
Quote:
println phoenix.client.LoadWebServerExtenderNames().toString() and see what happens.
__________________
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 |
#8
|
||||
|
||||
Quote:
__________________
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 |
#9
|
|||
|
|||
The issue was that static was required when calling the API, so the following code works:
Code:
import static phoenix.client.* println phoenix.client.LoadWebServerExtenderNames() Thanks for your help folks.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
SageTV V7 - API: FindWidgetBySymbol on remote UI context | shadeblue.com | SageTV Beta Test Software | 10 | 07-17-2010 12:45 AM |
Context/ThreadLocal data | jphipps | SageTV Studio | 2 | 12-11-2009 12:26 PM |
Help with accessing Variables and variable Context. | stanger89 | SageTV Studio | 6 | 11-01-2006 09:38 AM |
Obtaining correct UI context | dflachbart | SageTV Studio | 3 | 07-17-2006 07:10 AM |