|
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
|
||||
|
||||
Finding the SageMC STVs directory
Okay, so I've been doing a bit of digging on this, and I haven't come up with a suitable answer.
I'm looking for a cross-platform manner for locating the SageTV STVs directory. The Sage API provides GetWorkingDirectory(), but the return from this is always context of the server. Unfortunately in the case of Sage Clients, it's not useful, as the client executes it's java on the client computer, not on the server, so if the client is a different OS or even installed in a different location, GetWorkingDirectory does not work. Using the java native function java_lang_System_getProperty("user.dir") is closer, as it works correctly whether the client is an extender (returns the working directory from the server), or whether the client is a full-blown sagetv client (returns the working directory of the sage client process). Unfortunately, even this isn't entirely cross-platform safe, as Mac clients have their "STVs" directory separate from the install location of the actual client process. So.... what's the right way to do this? I am trying to come up with a safe cross-platform mechanism for building a directory relative to "STVs/SageTV3" where I can drop some pre-set layouts for the user. Cheers Ikarius
__________________
SageTV 6.6.2, SageMC+CenterSage Theme Server: Intel Core2 Q6600, 8gb memory, 3x 1tb WD EACS drives, software RAID5 2tb capacity, 4gb Flash boot drive, Ubuntu 8.0.4 Server edition Capture: 1x HD-PVR -> Motorola DTC6200 Clients: 1x STX-HD100 1x STX-HD200, Windows & OSX Clients |
#2
|
||||
|
||||
You could try GetDefaultSTVFile() or GetCurrentSTVFile() and extract the parent directory from there. Of course I'm not sure how cross-platform safe this is either.
Aloha, Mike
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full." - Nikolaus (4yrs old) |
#3
|
||||
|
||||
Ahah! Thanks- I suspect that will work, since on extenders the STV is on the server, and on clients, the STV is on the client.... I completely missed that over in the widget API.... I'd looked through the config API, the Global API, and the Utility API, never thinking to look in the widget API.
EDIT: It works perfectly. Thank you so much! Cheers Ikarius
__________________
SageTV 6.6.2, SageMC+CenterSage Theme Server: Intel Core2 Q6600, 8gb memory, 3x 1tb WD EACS drives, software RAID5 2tb capacity, 4gb Flash boot drive, Ubuntu 8.0.4 Server edition Capture: 1x HD-PVR -> Motorola DTC6200 Clients: 1x STX-HD100 1x STX-HD200, Windows & OSX Clients Last edited by Ikarius; 03-12-2009 at 12:43 PM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FanArt for SageMC - Tutorial & Finding Images | Brent | SageMC Custom Interface | 221 | 08-29-2009 07:38 PM |
Record Directory Nested in Import Directory | jsonnabend | SageTV Software | 2 | 08-04-2008 06:59 AM |
Adding a UNC Import directory fails with "Invalid Directory" | Fastrack | SageTV Software | 2 | 03-09-2008 01:11 PM |
Add a directory to a playlist with SageMC | Athfar | SageMC Custom Interface | 4 | 07-12-2006 03:09 PM |
Video directory showing up in Import Video Directory | dvd_maniac | SageTV Software | 5 | 12-19-2004 09:38 AM |