mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
XbmcProvider updated to include new Json API methods.
EventClient is used for sending CleanLibrary and Notifications (With NzbDrone Logo - Internal Resource). Support for Dharma's HTTP Server (Deprecated), since Dharma doesn't support Json as well.
This commit is contained in:
parent
5bbc9a6f59
commit
348ff5a386
26 changed files with 1312 additions and 158 deletions
|
@ -1,4 +1,5 @@
|
|||
using NLog;
|
||||
using System;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Model;
|
||||
using NzbDrone.Core.Providers.Core;
|
||||
using NzbDrone.Core.Repository;
|
||||
|
@ -37,10 +38,19 @@ namespace NzbDrone.Core.Providers.ExternalNotification
|
|||
OnGrab(message);
|
||||
|
||||
else if (type == ExternalNotificationType.Download)
|
||||
OnDownload(message, seriesId);
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var series = new Series();
|
||||
OnDownload(message, series);
|
||||
}
|
||||
|
||||
|
||||
else if (type == ExternalNotificationType.Rename)
|
||||
OnRename(message, seriesId);
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var series = new Series();
|
||||
OnRename(message, series);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -53,14 +63,14 @@ namespace NzbDrone.Core.Providers.ExternalNotification
|
|||
/// Performs the on download action
|
||||
/// </summary>
|
||||
/// <param name = "message">The message to send to the receiver</param>
|
||||
/// <param name = "seriesId">The Series ID for the new download</param>
|
||||
public abstract void OnDownload(string message, int seriesId);
|
||||
/// <param name = "series">The Series for the new download</param>
|
||||
public abstract void OnDownload(string message, Series series);
|
||||
|
||||
/// <summary>
|
||||
/// Performs the on rename action
|
||||
/// </summary>
|
||||
/// <param name = "message">The message to send to the receiver</param>
|
||||
/// <param name = "seriesId">The Series ID for the new download</param>
|
||||
public abstract void OnRename(string message, int seriesId);
|
||||
/// <param name = "series">The Series for the new download</param>
|
||||
public abstract void OnRename(string message, Series series);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using NzbDrone.Core.Providers.Core;
|
||||
using NzbDrone.Core.Repository;
|
||||
|
||||
namespace NzbDrone.Core.Providers.ExternalNotification
|
||||
{
|
||||
|
@ -37,7 +38,7 @@ namespace NzbDrone.Core.Providers.ExternalNotification
|
|||
_logger.Trace("XBMC Notifier is not enabled");
|
||||
}
|
||||
|
||||
public override void OnDownload(string message, int seriesId)
|
||||
public override void OnDownload(string message, Series series)
|
||||
{
|
||||
const string header = "NzbDrone [TV] - Downloaded";
|
||||
|
||||
|
@ -52,7 +53,7 @@ namespace NzbDrone.Core.Providers.ExternalNotification
|
|||
if (Convert.ToBoolean(_configProvider.GetValue("XbmcUpdateOnDownload", false)))
|
||||
{
|
||||
_logger.Trace("Sending Update Request to XBMC");
|
||||
_xbmcProvider.Update(seriesId);
|
||||
_xbmcProvider.Update(series);
|
||||
}
|
||||
|
||||
if (Convert.ToBoolean(_configProvider.GetValue("XbmcCleanOnDownload", false)))
|
||||
|
@ -65,7 +66,7 @@ namespace NzbDrone.Core.Providers.ExternalNotification
|
|||
_logger.Trace("XBMC Notifier is not enabled");
|
||||
}
|
||||
|
||||
public override void OnRename(string message, int seriesId)
|
||||
public override void OnRename(string message, Series series)
|
||||
{
|
||||
const string header = "NzbDrone [TV] - Renamed";
|
||||
|
||||
|
@ -78,7 +79,7 @@ namespace NzbDrone.Core.Providers.ExternalNotification
|
|||
if (Convert.ToBoolean(_configProvider.GetValue("XbmcUpdateOnRename", false)))
|
||||
{
|
||||
_logger.Trace("Sending Update Request to XBMC");
|
||||
_xbmcProvider.Update(seriesId);
|
||||
_xbmcProvider.Update(series);
|
||||
}
|
||||
|
||||
if (Convert.ToBoolean(_configProvider.GetValue("XbmcCleanOnRename", false)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue