1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-29 03:15:19 +00:00
Radarr/NzbDrone.Core/Notifications/Plex/PlexServer.cs

52 lines
1.1 KiB
C#
Raw Normal View History

2013-07-19 03:47:55 +00:00
using NzbDrone.Core.Tv;
2013-05-19 23:17:32 +00:00
namespace NzbDrone.Core.Notifications.Plex
{
2013-05-20 02:43:22 +00:00
public class PlexServer : NotificationBase<PlexServerSettings>
2013-05-19 23:17:32 +00:00
{
private readonly IPlexService _plexProvider;
2013-05-19 23:17:32 +00:00
public PlexServer(IPlexService plexProvider)
2013-05-19 23:17:32 +00:00
{
_plexProvider = plexProvider;
}
public override string Name
{
get { return "Plex Server"; }
}
public override string ImplementationName
{
get { return "Plex Server"; }
}
public override string Link
{
get { return "http://www.plexapp.com/"; }
}
2013-05-19 23:17:32 +00:00
public override void OnGrab(string message)
{
}
public override void OnDownload(string message, Series series)
{
UpdateIfEnabled();
}
public override void AfterRename(Series series)
{
UpdateIfEnabled();
}
private void UpdateIfEnabled()
{
if (Settings.UpdateLibrary)
{
_plexProvider.UpdateLibrary(Settings);
2013-05-19 23:17:32 +00:00
}
}
}
}