Jump to content

API Call for Scanning Specific Folder into Library


dcrdev

Recommended Posts

I'm developing a post processing script for Movies and am trying to implement Emby notifications/updates - so far I'm able to scan the media library as a whole, but would like to only scan in a specific directory under my media library. Essentially I want this workflow:

 

  • New Media Drops into Temporary Folder
  • Script Picks up Media from Temp Folder
  • Processing Occurs
  • Script Drops Media into Relevant Emby Media Folder  (for examples sake let's call it /storage/Movies)
  • Notification sent to Emby informing it that there is a new item in /storage/Movies called ./Some Movie (2016)
  • /storage/Movies/Some Movie (2016) is scanned into library leaving everything else in /storage/Movies untouched.

 

Currently I'm just making a call to emby/Library/Refresh, sending an empty json string and it takes forever to receive back a response - presumably because it's waiting for the entire library refresh to complete.

 

Thanks,

Link to comment
Share on other sites

I wish the swagger UI weren't so broken, but I figured it out for anyone who's interested:

 

The API call should be made to /Library/Movies/Added and it accepts 2 parameters for IMDB and TMDB Ids:

{\"TmdbId\": \"\", \"ImdbId\": \"\"}
Link to comment
Share on other sites

I believe the above call is nothing but a notification.

 

When you drop the item into the Emby library area, if that library is being monitored in real time, then the system will ingest it automatically.

Link to comment
Share on other sites

True it just notifies Emby to scan the library - however it's 10x faster than /emby/Library/Refresh for some reason?

 

Also the script is intended to be drop in and I'd prefer to not have to rely on real-time monitoring which doesn't work in all situations for example it doesn't work with the btrfs file system on linux.

 

All working now though.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...