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-11-2009, 04:36 PM
Ikarius's Avatar
Ikarius Ikarius is offline
Sage Advanced User
 
Join Date: Aug 2008
Posts: 84
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
Reply With Quote
  #2  
Old 03-11-2009, 04:52 PM
MeInMaui's Avatar
MeInMaui MeInMaui is offline
SageTVaholic
 
Join Date: Feb 2005
Location: Maui. HI
Posts: 4,203
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)
Reply With Quote
  #3  
Old 03-11-2009, 05:11 PM
Ikarius's Avatar
Ikarius Ikarius is offline
Sage Advanced User
 
Join Date: Aug 2008
Posts: 84
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.
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
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


All times are GMT -6. The time now is 09:48 AM.


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