![]() |
|
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
|
||||
|
||||
Using AddMediaFile properly
Gents,
I am using AddMediaFile(), AddShow() and SetMediaFileShow() to add .mpg files to the imported videos. I'm noticing something strange, when I go to MediaCenter->Videos and view by Folders the imported files show up at the root and the folder they are stored in is not shown at all. I have an import directory defined as \\SERVER\Movies. I am storing the new .mpg's in \\SERVER\Movies\NewFolder. When I call AddMediaFile() I am passing it the file name and the folder name (NewFolder in my simple example.) Should I be using a null instead of the folder name? What am I doing wrong? Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#2
|
||||
|
||||
Without seeing your actual code, my guess is that these two arguments aren't quite right. The first should be a java.io.File (not just the String name of the file). The second should be a String that is a proper substring of the full path of the File.
So the File would be something like \\SERVER\Movies\NewFolder\MyFile.mpg (again, as a File, not a String), and the prefix would be "NewFolder". Also be sure to check the result of the call to make sure it actually worked. If, for instance, the file is already in the database, then this call will have no effect.
__________________
-- Greg |
#3
|
||||
|
||||
Greg,
I am using a java.io.File and a string. I'm pretty sure it's working, the result is non-null and IsMediaFileObject() returns true. Everything else about the MediaFile seems good. I use AddShow() and SetMediaFileAShow() and all of the data I populate appears when I select "View Video Detail" from the Media Center -> Videos menu. The only strange thing is that in the Folder view it appears at the root instead in the subdirectory where it actually exists. I tried using null and "" for the second parameter and it made no difference at all. I'm really not sure what that parameter is supposed to do, for me it seems to do nothing at all ![]() There is only 1 place in the default STV where this method is used and I think I'm using it the exact same way. Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Long ramble on AddShow, AddAiring, AddMediaFile | nielm | SageTV Studio | 13 | 09-01-2006 04:06 PM |
how to PROPERLY back up sage? | T3rry | SageTV Software | 4 | 01-26-2006 06:36 AM |
In place recompression and AddMediaFile() | TiltRod | SageTV Studio | 6 | 12-16-2005 07:47 PM |
EPG not updating properly | JUC | SageTV Beta Test Software | 8 | 09-20-2005 09:52 AM |