diff --git a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowser.cs b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowser.cs index b13409dc7..fb265ef87 100644 --- a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowser.cs +++ b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowser.cs @@ -35,7 +35,7 @@ namespace NzbDrone.Core.Notifications.Emby if (Settings.UpdateLibrary) { - _mediaBrowserService.Update(Settings, message.Series); + _mediaBrowserService.Update(Settings, message.Series, "Created"); } } @@ -43,7 +43,7 @@ namespace NzbDrone.Core.Notifications.Emby { if (Settings.UpdateLibrary) { - _mediaBrowserService.Update(Settings, series); + _mediaBrowserService.Update(Settings, series, "Modified"); } } diff --git a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs index b5e1da15a..fc4c1a93f 100644 --- a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs +++ b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs @@ -31,11 +31,23 @@ namespace NzbDrone.Core.Notifications.Emby ProcessRequest(request, settings); } - public void Update(MediaBrowserSettings settings, int tvdbId) + public void Update(MediaBrowserSettings settings, string seriesPath, string updateType) { - var path = string.Format("/Library/Series/Updated?tvdbid={0}", tvdbId); + var path = "/Library/Media/Updated"; var request = BuildRequest(path, settings); - request.Headers.Add("Content-Length", "0"); + request.Headers.ContentType = "application/json"; + + request.SetContent(new + { + Updates = new[] + { + new + { + Path = seriesPath, + UpdateType = updateType + } + } + }.ToJson()); ProcessRequest(request, settings); } diff --git a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserService.cs b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserService.cs index c1280c309..524fa65c6 100644 --- a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserService.cs +++ b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserService.cs @@ -10,7 +10,7 @@ namespace NzbDrone.Core.Notifications.Emby public interface IMediaBrowserService { void Notify(MediaBrowserSettings settings, string title, string message); - void Update(MediaBrowserSettings settings, Series series); + void Update(MediaBrowserSettings settings, Series series, string updateType); ValidationFailure Test(MediaBrowserSettings settings); } @@ -30,9 +30,9 @@ namespace NzbDrone.Core.Notifications.Emby _proxy.Notify(settings, title, message); } - public void Update(MediaBrowserSettings settings, Series series) + public void Update(MediaBrowserSettings settings, Series series, string updateType) { - _proxy.Update(settings, series.TvdbId); + _proxy.Update(settings, series.Path, updateType); } public ValidationFailure Test(MediaBrowserSettings settings)