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 04-11-2010, 05:51 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
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.
Reply With Quote
  #2  
Old 04-11-2010, 12:02 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by tmiranda View Post
...I am passing it the file name and the folder name...
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
Reply With Quote
  #3  
Old 04-11-2010, 03:47 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
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.
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
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


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


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