2013-07-19 06:47:55 +03:00
|
|
|
using NzbDrone.Core.Tv;
|
2013-05-20 02:17:32 +03:00
|
|
|
|
|
|
|
namespace NzbDrone.Core.Notifications.Plex
|
|
|
|
{
|
2013-05-20 05:43:22 +03:00
|
|
|
public class PlexClient : NotificationBase<PlexClientSettings>
|
2013-05-20 02:17:32 +03:00
|
|
|
{
|
2013-06-13 09:41:26 +03:00
|
|
|
private readonly IPlexService _plexProvider;
|
2013-05-20 02:17:32 +03:00
|
|
|
|
2013-06-13 09:41:26 +03:00
|
|
|
public PlexClient(IPlexService plexProvider)
|
2013-05-20 02:17:32 +03:00
|
|
|
{
|
|
|
|
_plexProvider = plexProvider;
|
|
|
|
}
|
|
|
|
|
|
|
|
public override string Name
|
|
|
|
{
|
|
|
|
get { return "Plex Client"; }
|
|
|
|
}
|
|
|
|
|
2013-06-13 09:41:26 +03:00
|
|
|
public override string ImplementationName
|
|
|
|
{
|
|
|
|
get { return "Plex Client"; }
|
|
|
|
}
|
|
|
|
|
2013-07-27 23:57:41 +03:00
|
|
|
public override string Link
|
|
|
|
{
|
|
|
|
get { return "http://www.plexapp.com/"; }
|
|
|
|
}
|
|
|
|
|
2013-05-20 02:17:32 +03:00
|
|
|
public override void OnGrab(string message)
|
|
|
|
{
|
|
|
|
const string header = "NzbDrone [TV] - Grabbed";
|
|
|
|
_plexProvider.Notify(Settings, header, message);
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void OnDownload(string message, Series series)
|
|
|
|
{
|
|
|
|
const string header = "NzbDrone [TV] - Downloaded";
|
|
|
|
_plexProvider.Notify(Settings, header, message);
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void AfterRename(Series series)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|