SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio

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 02-19-2008, 04:51 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,186
On a tangent, do/how do IsFilePath and IsDirectoryPath work. I was trying to back out some of my native Java calls and convert java_io_File_canRead(new_java_io_File(somefile)) to IsFilePath(somefile), but playing with expression evaluator I can't ever get it to return true:

IsFilePath("D\:\\results.csv") returns null, and results.csv most certainly is in D:\ on my PC running the Studio session. Same for IsDirectoryPath, IsDirectoryPath("C\:\\") also returns null.

Kind of looks like I get "null" where I should get "true"

Oh, and tangential to the tangent we're already on, if we put DVDs in just a folder (no longer in VIDEO_TS folder in another folder) where should the associated folder.jpg go, just in the folder? (how's that for confusing, bonus points if you make sense of it )

Oh2, and tangentially tangential to the tangent we're on from the original tangent , is StartFileCopy safe to use to copy, say, an image from one directory to folder.jpg?
Reply With Quote
  #2  
Old 02-19-2008, 05:04 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by stanger89 View Post
IsFilePath("D\:\\results.csv") returns null, and results.csv most certainly is in D:\ on my PC running the Studio session. Same for IsDirectoryPath, IsDirectoryPath("C\:\\") also returns null.
Don't backslash the colons. Remember that Studio code is not Java, so not all of the Java rules apply. Apparently the widget interpreter doesn't grok "\:".
__________________
-- Greg
Reply With Quote
  #3  
Old 02-19-2008, 06:02 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,186
Tried that too, I get false for both then.
Reply With Quote
  #4  
Old 02-19-2008, 06:02 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,595
Quote:
Originally Posted by stanger89 View Post
On a tangent, do/how do IsFilePath and IsDirectoryPath work. I was trying to back out some of my native Java calls and convert java_io_File_canRead(new_java_io_File(somefile)) to IsFilePath(somefile), but playing with expression evaluator I can't ever get it to return true:

IsFilePath("D\:\\results.csv") returns null, and results.csv most certainly is in D:\ on my PC running the Studio session. Same for IsDirectoryPath, IsDirectoryPath("C\:\\") also returns null.
In addition to what Greg said, don't forget that the SageTV API calls work in reference to the server. So, if the file calls need to be local to the client, you should use the Java calls -- see p. 152 of the v6.3 Studio manual.

Also, in case this is ever needed: a lot of times, I will use CreateFilePath() to build paths.

Quote:
Oh, and tangential to the tangent we're already on, if we put DVDs in just a folder (no longer in VIDEO_TS folder in another folder) where should the associated folder.jpg go, just in the folder? (how's that for confusing, bonus points if you make sense of it )
You'll have to let us know after you try it. I figure it would go in the same folder as all the VOB files, but I haven't tried it yet.

Quote:
Oh2, and tangentially tangential to the tangent we're on from the original tangent , is StartFileCopy safe to use to copy, say, an image from one directory to folder.jpg?
Off the top of my head, I would think so... it can be used to copy a file from a client to an import folder & is what I use to copy downloaded files to an import dir. There is a new RenameFilePath() call, in case you need to rename the image after the copy.

- 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
  #5  
Old 02-19-2008, 06:24 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,186
Quote:
Originally Posted by Opus4 View Post
In addition to what Greg said, don't forget that the SageTV API calls work in reference to the server. So, if the file calls need to be local to the client, you should use the Java calls -- see p. 152 of the v6.3 Studio manual.
Wow, I really thought that studio calls ran in respect to, how should I put it, where the STV is executed, ie on the client for SageClient, or on the "server" for SageTV or an extender.

Oh well, that solves that question, if I specify a path on the server, IsFilePath works as expected. Strangely, I don't have a C: drive in my server (thanks Windows )

Guess I better put that back the way it was or it will get too confusing with my java code running potentially with different "visibility" than the studio code.

Quote:
You'll have to let us know after you try it. I figure it would go in the same folder as all the VOB files, but I haven't tried it yet.
Why does that answer not surprise me

Quote:
Off the top of my head, I would think so... it can be used to copy a file from a client to an import folder & is what I use to copy downloaded files to an import dir. There is a new RenameFilePath() call, in case you need to rename the image after the copy.

- Andy
Maybe I'll just stick with my (seemingly slow) custom java copier, unless someone has a clue-by-4 to point me to a native java copy function.
Reply With Quote
  #6  
Old 02-19-2008, 09:30 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,595
Quote:
Originally Posted by stanger89 View Post
Wow, I really thought that studio calls ran in respect to, how should I put it, where the STV is executed, ie on the client for SageClient, or on the "server" for SageTV or an extender.

Oh well, that solves that question, if I specify a path on the server, IsFilePath works as expected. Strangely, I don't have a C: drive in my server (thanks Windows )

Guess I better put that back the way it was or it will get too confusing with my java code running potentially with different "visibility" than the studio code.
Since SageTV has a server/client config, there has to be some way for the client to do file operations that are affected by what the server sees, thus the SageTV file API calls access paths as the server sees them. The Java calls already access the local file system. I use both in the default STV, depending on what the file access purpose is.

The SageTV API calls are perfect for accessing the recording or import dirs from any client.

Quote:
Maybe I'll just stick with my (seemingly slow) custom java copier, unless someone has a clue-by-4 to point me to a native java copy function.
I thought that if you were copying a folder.jpg image into place, it might be to copy it into an import folder where it could be used as a thumbnail. So, I figured StartFileCopy() would work perfectly fine for that purpose. If you are copying to a client from the library, you can use StartFileDownload().

Maybe it would help to describe what you are trying to do regarding file copying & someone could offer a better suggestion.

- 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
  #7  
Old 02-20-2008, 07:31 AM
BobPhoenix BobPhoenix is offline
SageTVaholic
 
Join Date: Oct 2004
Posts: 3,133
Just note that when SageTV 6.1 was out I asked why I couldn't use the Sage copy functions to copy all files from one directory to another (the media file and the other text files you might get with comskip or xml) and was told it was only for media files. So images, audio and video will work fine but don't expect the other files to work. But that may have changed since 6.1 too I haven't tried it again since then.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


All times are GMT -6. The time now is 06:13 PM.


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