Emby - any way to trigger an update
Emby - any way to trigger an update
I've been toying with Emby as an alternative to Plex recently. I use the AMC script in filebot to sort all my media. The AMC script has a command that triggers Plex to update.
Is there a way to trigger Emby to update, or can it be included in the AMC script? I know it can receive an update trigger as Sickrage has the built in functionality, but I have zero idea of how to do it.
Thanks for your help.
Is there a way to trigger Emby to update, or can it be included in the AMC script? I know it can receive an update trigger as Sickrage has the built in functionality, but I have zero idea of how to do it.
Thanks for your help.
Re: Emby - any way to trigger an update
I've got some info from over on the Emby forums as to their api to update the library, they provided me this:
And this advice:
Code: Select all
[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; }
}
Is this something the AMC script can work with?an api_key query string param is required, which the user can generate in their server dashboard under advanced
Re: Emby - any way to trigger an update
An example request with the curl command for requesting a rescan would be extremely helpful.
Re: Emby - any way to trigger an update
No problems, I''ll go back to the devs and see what I can get 

Re: Emby - any way to trigger an update
Hi Luke,
I've been told that to request the library refresh, you can issue a post command to:
http://localhost:8096/Library/Refresh?api_key='key'
Where 'key' is the api key created in the advanced settings in Emby.
I've tested this on my system and it does indeed trigger a library refresh.
Can that be then incorporated into AMC? I assume something similar to Plex, ie:
--def emby=host:token where token is the api key created in the advanced settings.
Is that possible? Or is there some way I can include that at the same time as using the AMC script?
I've been told that to request the library refresh, you can issue a post command to:
http://localhost:8096/Library/Refresh?api_key='key'
Where 'key' is the api key created in the advanced settings in Emby.
I've tested this on my system and it does indeed trigger a library refresh.
Can that be then incorporated into AMC? I assume something similar to Plex, ie:
--def emby=host:token where token is the api key created in the advanced settings.
Is that possible? Or is there some way I can include that at the same time as using the AMC script?
Re: Emby - any way to trigger an update
Looks good. I'll add this when I'm back (around 23 February).
Re: Emby - any way to trigger an update
That's awesome mate, thankyou.
Re: Emby - any way to trigger an update
Done. Please test the latest revision by calling dev:amc.
Code: Select all
--def emby=127.0.0.1:<APIKEY>
Re: Emby - any way to trigger an update
Thanks mate. Just gave it a quick run and log shows this:
Looks like it sending a GET not a POST from my basic understanding?
(Replaced my API key with 'key' for posting purposes).
Code: Select all
Notify Emby: 192.168.1.21
GET: http://192.168.1.21:8096/Library/Refresh?api_key=key
FileNotFoundException: http://192.168.1.21:8096/Library/Refresh?api_key=key
Done ヾ(@⌒ー⌒@)ノ
(Replaced my API key with 'key' for posting purposes).
Re: Emby - any way to trigger an update
Alright, using a POST request instead. So should api_key be passed as GET parameter, POST parameter, or HTTP HEADER then?
Re: Emby - any way to trigger an update
Using postman extension in Chrome, if I send the command (the whole http://192.168.1.21:8096/Library/Refresh?api_key=key) as a POST parameter, it triggers the update.
Does that help?
Does that help?
Re: Emby - any way to trigger an update
That means you're sending a POST request with GET parameters, but without any POST parameters.
Do -clear-cache once and try again.
Do -clear-cache once and try again.
Re: Emby - any way to trigger an update
That did the trick, working perfectly now. Can't say how much I appreciate the help, thankyou.