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 06-22-2009, 12:02 PM
sam.griffin.bht sam.griffin.bht is offline
Sage User
 
Join Date: Jun 2009
Location: Boston
Posts: 28
Path

Hey everyone,
I am a little confused about how to create a path. Can someone just lay down the basic structure?
Reply With Quote
  #2  
Old 06-22-2009, 12:18 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
I'm not quite sure what you're asking. Are you talking about file paths, as in creating an instance of java.io.File? Just invoke the constructor as shown on p. 151 of the Studio manual, i.e. new_java_io_File(args).

Or are you saying you want to actually create directories on disk? There are methods in java.io.File for that; see the Java API docs.

Or are you talking about something else entirely?
__________________
-- Greg
Reply With Quote
  #3  
Old 06-22-2009, 12:49 PM
sam.griffin.bht sam.griffin.bht is offline
Sage User
 
Join Date: Jun 2009
Location: Boston
Posts: 28
Thanks for the quick response.

Must have somehow missed it in the studio guide. Got it now!
Reply With Quote
  #4  
Old 06-23-2009, 06:29 AM
sam.griffin.bht sam.griffin.bht is offline
Sage User
 
Join Date: Jun 2009
Location: Boston
Posts: 28
Hmmmm, actually it appears I may have spoken too early.

One more question, if I wanted to create a path to say, music, would I have to do something like:

Music = new_java_io_File(C:\\.... all the way to music folder)
... commands to import albums, etc...

Would this allow me to import the albums with the correct commands, or am I creating a path incorrectly?

Also, I am a little confused about how to use the GetAlbums() command? Is there a place that can show me how these commands are actually used? Not the API command site, thats where I am now, but something like the studio tutorial that actually shows the commands in action.

Last edited by sam.griffin.bht; 06-23-2009 at 06:35 AM.
Reply With Quote
  #5  
Old 06-23-2009, 07:09 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by sam.griffin.bht View Post
Also, I am a little confused about how to use the GetAlbums() command? Is there a place that can show me how these commands are actually used? Not the API command site, thats where I am now, but something like the studio tutorial that actually shows the commands in action.
Yes: the default STV, SageTV3.xml.

- 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
  #6  
Old 06-23-2009, 09:53 AM
sam.griffin.bht sam.griffin.bht is offline
Sage User
 
Join Date: Jun 2009
Location: Boston
Posts: 28
I think I must be calling the path incorrectly because when I try to identify it with IsFilePath it keeps returning false.

I want to create a path to

C:\Program Files (x86)\SageTV\SageTV\STVs\SageTV3\Music

and when I do:

File = new_java_io_File(C:\\Program Files (x86)\\SageTV\\SageTV\\STVs\\SageTV3\\Music)

Nothing happens, nothing is created.

I began trying:

File = GetFileForSegment(...), but I'm not sure what should go in the parameters for getting to my music file.
Reply With Quote
  #7  
Old 06-23-2009, 10:12 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by sam.griffin.bht View Post
File = new_java_io_File(C:\\Program Files (x86)\\SageTV\\SageTV\\STVs\\SageTV3\\Music)
I believe there is no need to call "C:\\program files\sagetv\sagetv\" as this is called automatically or you can use getworkingdirectory

If you call the above you will limit yourself to people using the default install path which allot of people don't

So you should just be able to say

\\STVs\\Music
Reply With Quote
  #8  
Old 06-23-2009, 10:29 AM
sam.griffin.bht sam.griffin.bht is offline
Sage User
 
Join Date: Jun 2009
Location: Boston
Posts: 28
can I still call that with new_java_io_File(\\STVs\\Music\\) or am I suppose to use a different call with it in order to be in that path?
Reply With Quote
  #9  
Old 06-23-2009, 11:16 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
First of all, you need to put quotes around any string-valued function arguments.

Code:
new_java_io_File("\\STVs\\Music\\")
Also, as a matter of terminology, you don't "call" a path. You call a function or method. You pass in the path (in string form) as an argument.

I'm getting the impression that you have little or no programming experience prior to SageTV Studio. If that's the case, I strongly suggest you find a general "introduction to programming" tutorial to bone up on the basic concepts (such as strings, functions, expressions, variables, etc). With that background, you'll be able to ask better questions, and we'll be able to give better answers.
__________________
-- Greg
Reply With Quote
  #10  
Old 06-23-2009, 11:21 AM
sam.griffin.bht sam.griffin.bht is offline
Sage User
 
Join Date: Jun 2009
Location: Boston
Posts: 28
Thanks for your help, I've been meaning to get some good tutorials. All I've really been coding in is c for class, which is nothing like this. If you have any good suggestions for a good book, I'm all ears.
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
UNC path help APillowOfClouds SageTV Software 12 02-24-2009 01:25 AM
Which Upgrade Path? jptaz Hardware Support 18 08-27-2008 05:46 AM
what is the path? rnewman SageTV Software 5 06-19-2007 05:02 PM
UNC Path issue Wrx4me SageTV Software 5 11-28-2005 05:44 PM


All times are GMT -6. The time now is 02:27 AM.


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