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 10-14-2010, 07:08 PM
broconne broconne is offline
Sage Aficionado
 
Join Date: Feb 2009
Location: Cary, NC
Posts: 306
RunLibraryImportScan vs. AddMediaFile

Is there any substantial difference between the two commands: RunLibraryImportScan and AddMediaFile if all I am doing is looking to add a new file in the one of the import paths to Sage?

Will the AddMediaFile method invoke BMT (if configured and installed obviously) or other plugins that listen for new media?
Reply With Quote
  #2  
Old 10-14-2010, 07:15 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by broconne View Post
Is there any substantial difference between the two commands: RunLibraryImportScan and AddMediaFile if all I am doing is looking to add a new file in the one of the import paths to Sage?

Will the AddMediaFile method invoke BMT (if configured and installed obviously) or other plugins that listen for new media?
I can't be certain, but I'm pretty sure, AddMediaFile will fire the add media file event (which is what bmt will listen for).

If you add media to an import area, then I'd just use RunLibraryImportScan, which is what is called when you hit "Refresh Library" from the Metadata Tools web UI. (that's what I use). I have 1000s of shows/movies and when I use that to force a refresh they show up in sage almost immediately after.
Reply With Quote
  #3  
Old 10-14-2010, 07:23 PM
broconne broconne is offline
Sage Aficionado
 
Join Date: Feb 2009
Location: Cary, NC
Posts: 306
Quote:
Originally Posted by stuckless View Post
I can't be certain, but I'm pretty sure, AddMediaFile will fire the add media file event (which is what bmt will listen for).

If you add media to an import area, then I'd just use RunLibraryImportScan, which is what is called when you hit "Refresh Library" from the Metadata Tools web UI. (that's what I use). I have 1000s of shows/movies and when I use that to force a refresh they show up in sage almost immediately after.
Thanks. My problem is that I have over 13,000 songs in my music collection. So an library import scan can take over 10 minutes or so. I will try AddMediaFile and see if that works.
Reply With Quote
  #4  
Old 10-14-2010, 07:50 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by broconne View Post
Thanks. My problem is that I have over 13,000 songs in my music collection. So an library import scan can take over 10 minutes or so. I will try AddMediaFile and see if that works.
Add media file works fine in my testing.
Reply With Quote
  #5  
Old 10-14-2010, 08:26 PM
broconne broconne is offline
Sage Aficionado
 
Join Date: Feb 2009
Location: Cary, NC
Posts: 306
Quote:
Originally Posted by PLUCKYHD View Post
Add media file works fine in my testing.
Thanks Plucky -
I am trying to figure out "NamePrefix" argument.. Should that just be the import path that matches the file I am adding?

The docs say
Code:
NamePrefix- the 'prefix' to prepend to the name of this media file for hierarchical purposes (i.e. the subdirectory that the file is in relative to the import root)
But it isn't clear to me what that really means or how it is used. For example, consider the following media "\\nas\TV\Cool Show\Cool Show S24E28.mkv". If my import directory is "\\nas\TV" - would I just set that as my "NamePrefix"?
Reply With Quote
  #6  
Old 10-15-2010, 05:04 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by broconne View Post
But it isn't clear to me what that really means or how it is used. For example, consider the following media "\\nas\TV\Cool Show\Cool Show S24E28.mkv". If my import directory is "\\nas\TV" - would I just set that as my "NamePrefix"?
I interpreted this to mean you should use "Cool Show" because that is the subdirectory relative to the import root (i.e. root = \\nas\TV). Let me know what you find because I'm not convinced I have it right.

BTW - If you use AddMediaFile you do not have to run RunLibraryImportScan().
__________________

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
  #7  
Old 10-15-2010, 06:13 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by tmiranda View Post
I interpreted this to mean you should use "Cool Show" because that is the subdirectory relative to the import root (i.e. root = \\nas\TV). Let me know what you find because I'm not convinced I have it right.

BTW - If you use AddMediaFile you do not have to run RunLibraryImportScan().
That makes sense I have been passing it like so

Code:
AddMediaFile(File,File.getAbsolutePath())
As I didn't get correct results it seems when just passing it relative to the import path although I am not sure where exactly that part gets used.
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
Using AddMediaFile properly tmiranda SageTV Studio 2 04-11-2010 03:47 PM
Long ramble on AddShow, AddAiring, AddMediaFile nielm SageTV Studio 13 09-01-2006 04:06 PM
In place recompression and AddMediaFile() TiltRod SageTV Studio 6 12-16-2005 07:47 PM


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


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