Jump to content

Trigger Update


Go to solution Solved by richie83,

Recommended Posts

Posted

I've been playing around with Emby server and using Kodi as a front end, and I'm thoroughly impressed.

 

I'm using Filebot to rename my files (filebot runs on server 1, files transferred to server 2) and Sickrage as a a 'snatcher' for my TV. Filebot has the ability to notify Plex to update it's library, as does Sickrage.

 

My question is, is there either a command or script that can be used by filebot to trigger an update on Emby?

 

This is basically 1 of 2 things remaining that I want to sort out and Emby is practically the perfect solution for me.

 

Any ideas? 

Posted

yes we do have an api could be used. would have you to file a feature request with filebot to add this?

Posted

Hi Luke. I believe the api call for Plex is related to the AMC script, I've posted in their forums for some guidance too.

 

 

Is there some documentation for the API that I could link them too?

Posted

here are the two endpoints that we have. i would have preferred just getting the file path but other tools sending notifications wanted this.

[Route("/Library/Series/Added", "POST", Summary = "Reports that new episodes of a series have been added by an external source")]
    [Route("/Library/Series/Updated", "POST", Summary = "Reports that new episodes of a series have been added by an external source")]
    [Authenticated]
    public class PostUpdatedSeries : IReturnVoid
    {
        [ApiMember(Name = "TvdbId", Description = "Tvdb Id", IsRequired = false, DataType = "string", ParameterType = "path", Verb = "GET")]
        public string TvdbId { get; set; }
    }

    [Route("/Library/Movies/Added", "POST", Summary = "Reports that new movies have been added by an external source")]
    [Route("/Library/Movies/Updated", "POST", Summary = "Reports that new movies have been added by an external source")]
    [Authenticated]
    public class PostUpdatedMovies : IReturnVoid
    {
        [ApiMember(Name = "TmdbId", Description = "Tmdb Id", IsRequired = false, DataType = "string", ParameterType = "path", Verb = "GET")]
        public string TmdbId { get; set; }
        [ApiMember(Name = "ImdbId", Description = "Imdb Id", IsRequired = false, DataType = "string", ParameterType = "path", Verb = "GET")]
        public string ImdbId { get; set; }
    }

an api_key query string param is required, which the user can generate in their server dashboard under advanced

Posted

Thanks Luke, I'll take it over to the filebot forums and see if we have any luck.

Posted

Hi Luke,

 

The dev over at filebot has asked:

 

 

 

An example request with the curl command for requesting a rescan would be extremely helpful.

 

Can you provide this?

Posted

a full library rescan and not the above methods?

Posted

I have zero idea about programming, is the above method you posted a curl command? I assume the above methods just scan changed files?

 

I think what they are referring to is a curl command that prompts a library rescan for changes, not a full rescan?

Posted

The url to refresh is 

/Library/Refresh

which also requires an api_key supplied by the user. There isn't really much more to it than that. the user will have to configure in filebot the base url to their emby server, along with an api key that they've created. then filebot will invoke the api endpoints. We do have a wiki on the api here

 

https://github.com/MediaBrowser/Emby/wiki

 

But it's really not even needed to accomplish this task as i've gone over everything that you need right here in this thread.

Posted

Thanks Luke. I've made more sense of it now, and actually tested it and got it working.

 

Post here in case it helps:

 

So basically, issue a POST command to http://localhost:8096/Library/Refresh?api_key=key'

 

Create a key in the Advanced settings, use that key in 'key' above and trigger a post command.

 

Now that I've figured that out, I've conveyed it to the filebot team and see what they can do.

  • Solution
Posted

Just an update, Filebot now supports this with the following parameters:

--def emby=host:apikey

Host= Your emby server IP (excluding the port, it defaults to 8096)

apikey = The api key you assigned in advanced settings

 

Tested this working myself and it triggers an library refresh on emby, works great.

 

Reference: https://www.filebot.net/forums/viewtopic.php?f=4&t=215&sid=3546836d0971d3b305fe46437ed0dd79

 

Thanks for all your help on this :-)

  • Like 1
  • 8 months later...
  • 4 weeks later...
Posted

Would anyone be kind enough to provide an example using curl to perform a targeted refresh for a single movie/tv show if the path is provided?  I've got the full library refresh working but I would like to know what options are are available for refreshing specific items rather than the entire library as that can be time consuming.  Luke eluded to this being a possibility in a previous post but I'm struggling with connecting the dots.

 

Thanks in advance!  

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...