parent
1b0c6b919f
commit
ecebe73c33
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue