|
SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
API questions
From within Java or Groovy what call can I use to find the SageTV install path (usually something like "C:\Program Files\SageTV") and also the root Fanart folder? I am guessing the latter is from the Phoenix API? Or did that become part of the core system with V7?
Are there docs posted for the Phoenix API? I tried looking but couldn't find anything other than Sagex stuff.
__________________
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
|
||||
|
||||
Quote:
https://code.google.com/p/sagephoeni...q=#makechanges SageTV JavaDoc http://download.sage.tv/api/index.ht...e-summary.html As a URL can you get the central fanart folder by calling... http://192.168.1.10:8080/sagex/phoen...tCentralFolder As as url you can probably get your local sagetv server directory using... http://192.168.1.10:8080/sagex/api?c...uteFilePath&1=
__________________
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 |
#3
|
|||
|
|||
So from within Java/Groovy can I just use:
FanartFolder=phoenix.fanart.GetFanartCentralFolder() ? And then the Sage folder would be: SageFolder=Utility.GetAbsoluteFilePath() I was looking for it in the Global and Configuration trees rather than in Utility. Thanks - I am using these for the creation of Fanart for Home Videos, but hopefully you can add that functionality to BMT.
__________________
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 |
#4
|
||||
|
||||
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 |
#5
|
|||
|
|||
The GetAbsoluteFilePath works with Sagex from a URL but when I try to call it from Java it seems to want an argument of type file. Here is the doc for that call:
Code:
GetAbsoluteFilePath public java.lang.String GetAbsoluteFilePath(java.io.File FilePath) Returns the full path name from the specified file path.. Parameters: FilePath - the filepath to get the full path from Returns: the full path from the specified file path Since: 7.0
__________________
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 |
#6
|
|||
|
|||
You seem to have been anticipating Google's purchase of Nest as it looks like you have already integrated Nest functionality into Sage!
__________________
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
|
|||
|
|||
If you want to get the Sage install dir, I'd just access it via (in Groovy syntax):
Code:
def sageHome = System.getProperty('user.dir') println sageHome (Less the x86 on 32bit systems.) SageTV.exe always launches its JVM instance from the dir containing the exe so the user.dir sys property is always going to be set to the root directory of the Sage install.
__________________
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... |
#8
|
|||
|
|||
Thanks Slugger - I guess the downside is that when I run this in the Groovy Console I get the path of the Groovy folder.
Any ideas on the issue that I mention above for the Fanart folder? Can I hook into the phoenix api from Groovy? I have tried to do so from the Groovy Console, installing the phoenix jar in the lib folder and restarting the console. What would the syntax be for a call to phoenix - do I have it right above in post 3?
__________________
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 |
#9
|
|||
|
|||
Make me put my thinking cap on tonight... To always get your server's root install dir, farm the getProp() call to the Sage server via sagex using the WidgetAPI (again, in Groovy):
Code:
def sageHome = WidgetAPI.EvaluateExpression('java_lang_System_getProperty("user.dir")') println sageHome As for phoenix, after copying the jar, did you import it into your script? The SageGroovy console only auto imports the sagex APIs. Additional external APIs will have to be explicitly imported. The syntax looks a little off (to me) just because it looks like you're missing the class. The link to the javadocs is a zip, which I wasn't dloading and installing locally at this hour, sorry. But anyway, it'll work, it's just a matter of installing the jar, importing the proper class(es) and then properly calling the methods you want. Happy scripting!
__________________
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... |
#10
|
|||
|
|||
I think I forgot to import it into my script. That will do it.
__________________
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 |
#11
|
||||
|
||||
Quote:
Quote:
Code:
GetAbsoluteFilePaht("") Code:
GetAbsoluteFilePaht(new java.io.File(""))
__________________
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 |
#12
|
|||
|
|||
OK, I am still having trouble using Phoenix calls in Groovy. Here is my code:
Code:
import sagex.phoenix.* println (fanart.LocalFanartSupport.GetFanartCentralFolder()) Code:
groovy.lang.MissingMethodException: No signature of method: static sagex.phoenix.fanart.LocalFanartSupport.GetFanartCentralFolder() is applicable for argument types: () values: [] Possible solutions: GetFanartCentralFolder(), SetFanartCentralFolder(java.lang.String)
__________________
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 |
#13
|
|||
|
|||
Method 1 didn't work - you need to pass a file as an argument. But method two did - thanks for the help!
__________________
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 Last edited by wayner; 01-14-2014 at 11:25 PM. |
#14
|
||||
|
||||
Quote:
under the phoenix package, there are packages for each sub package (ie, fanart, metadata, menus, media, etc). to call it, you probably don't need any imports... and just use... Code:
String folder = phoenix.fanart.GetFanartCentralFolder();
__________________
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 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ROKU Questions, Plex Questions | ThePaladinTech | The SageTV Community | 16 | 08-26-2013 10:53 PM |
Newbie questions... hardware questions | bigRoN18 | Hardware Support | 9 | 10-13-2010 02:50 PM |
DVB-S & DVB-T Questions | Mahoney | Hardware Support | 8 | 08-08-2005 10:35 AM |
Some questions | Athfar | SageTV Software | 2 | 08-05-2005 01:29 PM |
Two Questions | RageFury | SageTV Software | 3 | 10-30-2004 01:09 PM |