From 9e7cb708bfa92f48bbbdb68c84765ef394ecf19f Mon Sep 17 00:00:00 2001 From: vertigo235 Date: Tue, 24 Jan 2017 14:17:24 -0500 Subject: [PATCH] Initial Notification Updates and Support (#401) * Bare bones of notifications working. * Add MovieDownload event handler To allow Download notificaitons * Update pushover text to indicate movie * Initial Notification Support On Download and On Grab notifications should work. * Telegram Notification Text * Update Custom Script For Movies * Update PP script WiKi page Also added wiki page to Radarr wiki. --- .../Notifications/Boxcar/Boxcar.cs | 8 +- .../CustomScript/CustomScript.cs | 93 +++++++------- .../Notifications/DownloadMessage.cs | 3 + .../Notifications/Email/Email.cs | 10 +- .../Notifications/GrabMessage.cs | 2 + .../Notifications/Growl/Growl.cs | 8 +- .../Notifications/INotification.cs | 1 + src/NzbDrone.Core/Notifications/Join/Join.cs | 8 +- .../MediaBrowser/MediaBrowser.cs | 8 +- .../Notifications/NotificationBase.cs | 1 + .../Notifications/NotificationService.cs | 117 +++++++++++++++++- .../NotifyMyAndroid/NotifyMyAndroid.cs | 8 +- .../Notifications/Plex/PlexClient.cs | 4 + .../Notifications/Plex/PlexHomeTheater.cs | 4 + .../Notifications/Plex/PlexServer.cs | 4 + .../Notifications/Prowl/Prowl.cs | 8 +- .../Notifications/PushBullet/PushBullet.cs | 8 +- .../Notifications/Pushalot/Pushalot.cs | 8 +- .../Notifications/Pushover/Pushover.cs | 8 +- .../Notifications/Slack/Slack.cs | 4 + .../Notifications/Synology/SynologyIndexer.cs | 4 + .../Notifications/Telegram/Telegram.cs | 8 +- .../Notifications/Twitter/Twitter.cs | 4 + .../Notifications/Webhook/Webhook.cs | 4 + src/NzbDrone.Core/Notifications/Xbmc/Xbmc.cs | 4 + 25 files changed, 269 insertions(+), 70 deletions(-) diff --git a/src/NzbDrone.Core/Notifications/Boxcar/Boxcar.cs b/src/NzbDrone.Core/Notifications/Boxcar/Boxcar.cs index c3443c33b..aa83d5c90 100644 --- a/src/NzbDrone.Core/Notifications/Boxcar/Boxcar.cs +++ b/src/NzbDrone.Core/Notifications/Boxcar/Boxcar.cs @@ -18,18 +18,22 @@ namespace NzbDrone.Core.Notifications.Boxcar public override void OnGrab(GrabMessage grabMessage) { - const string title = "Episode Grabbed"; + const string title = "Movie Grabbed"; _proxy.SendNotification(title, grabMessage.Message, Settings); } public override void OnDownload(DownloadMessage message) { - const string title = "Episode Downloaded"; + const string title = "Movie Downloaded"; _proxy.SendNotification(title, message.Message, Settings); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { } diff --git a/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs b/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs index a160963c7..3c43608d2 100644 --- a/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs +++ b/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Collections.Specialized; using System.IO; using System.Linq; @@ -24,73 +25,73 @@ namespace NzbDrone.Core.Notifications.CustomScript _logger = logger; } - public override string Link => "https://github.com/Sonarr/Sonarr/wiki/Custom-Post-Processing-Scripts"; + public override string Link => "https://github.com/Radarr/Radarr/wiki/Custom-Post-Processing-Scripts"; public override void OnGrab(GrabMessage message) { - var series = message.Series; - var remoteEpisode = message.Episode; - var releaseGroup = remoteEpisode.ParsedEpisodeInfo.ReleaseGroup; + var movie = message.Movie; + var remoteMovie = message.RemoteMovie; + var releaseGroup = remoteMovie.ParsedEpisodeInfo.ReleaseGroup; var environmentVariables = new StringDictionary(); - environmentVariables.Add("Sonarr_EventType", "Grab"); - environmentVariables.Add("Sonarr_Series_Id", series.Id.ToString()); - environmentVariables.Add("Sonarr_Series_Title", series.Title); - environmentVariables.Add("Sonarr_Series_TvdbId", series.TvdbId.ToString()); - environmentVariables.Add("Sonarr_Series_Type", series.SeriesType.ToString()); - environmentVariables.Add("Sonarr_Release_EpisodeCount", remoteEpisode.Episodes.Count.ToString()); - environmentVariables.Add("Sonarr_Release_SeasonNumber", remoteEpisode.ParsedEpisodeInfo.SeasonNumber.ToString()); - environmentVariables.Add("Sonarr_Release_EpisodeNumbers", string.Join(",", remoteEpisode.Episodes.Select(e => e.EpisodeNumber))); - environmentVariables.Add("Sonarr_Release_Title", remoteEpisode.Release.Title); - environmentVariables.Add("Sonarr_Release_Indexer", remoteEpisode.Release.Indexer); - environmentVariables.Add("Sonarr_Release_Size", remoteEpisode.Release.Size.ToString()); - environmentVariables.Add("Sonarr_Release_ReleaseGroup", releaseGroup); + environmentVariables.Add("Radarr_EventType", "Grab"); + environmentVariables.Add("Radarr_Movie_Id", movie.Id.ToString()); + environmentVariables.Add("Radarr_Movie_Title", movie.Title); + environmentVariables.Add("Radarr_Movie_ImdbId", movie.ImdbId.ToString()); + environmentVariables.Add("Radarr_Release_Title", remoteMovie.Release.Title); + environmentVariables.Add("Radarr_Release_Indexer", remoteMovie.Release.Indexer); + environmentVariables.Add("Radarr_Release_Size", remoteMovie.Release.Size.ToString()); + environmentVariables.Add("Radarr_Release_ReleaseGroup", releaseGroup); ExecuteScript(environmentVariables); } public override void OnDownload(DownloadMessage message) { - var series = message.Series; - var episodeFile = message.EpisodeFile; + var movie = message.Movie; + var movieFile = message.MovieFile; var sourcePath = message.SourcePath; var environmentVariables = new StringDictionary(); - environmentVariables.Add("Sonarr_EventType", "Download"); - environmentVariables.Add("Sonarr_Series_Id", series.Id.ToString()); - environmentVariables.Add("Sonarr_Series_Title", series.Title); - environmentVariables.Add("Sonarr_Series_Path", series.Path); - environmentVariables.Add("Sonarr_Series_TvdbId", series.TvdbId.ToString()); - environmentVariables.Add("Sonarr_Series_Type", series.SeriesType.ToString()); - environmentVariables.Add("Sonarr_EpisodeFile_Id", episodeFile.Id.ToString()); - environmentVariables.Add("Sonarr_EpisodeFile_EpisodeCount", episodeFile.Episodes.Value.Count.ToString()); - environmentVariables.Add("Sonarr_EpisodeFile_RelativePath", episodeFile.RelativePath); - environmentVariables.Add("Sonarr_EpisodeFile_Path", Path.Combine(series.Path, episodeFile.RelativePath)); - environmentVariables.Add("Sonarr_EpisodeFile_SeasonNumber", episodeFile.SeasonNumber.ToString()); - environmentVariables.Add("Sonarr_EpisodeFile_EpisodeNumbers", string.Join(",", episodeFile.Episodes.Value.Select(e => e.EpisodeNumber))); - environmentVariables.Add("Sonarr_EpisodeFile_EpisodeAirDates", string.Join(",", episodeFile.Episodes.Value.Select(e => e.AirDate))); - environmentVariables.Add("Sonarr_EpisodeFile_EpisodeAirDatesUtc", string.Join(",", episodeFile.Episodes.Value.Select(e => e.AirDateUtc))); - environmentVariables.Add("Sonarr_EpisodeFile_EpisodeTitles", string.Join("|", episodeFile.Episodes.Value.Select(e => e.Title))); - environmentVariables.Add("Sonarr_EpisodeFile_Quality", episodeFile.Quality.Quality.Name); - environmentVariables.Add("Sonarr_EpisodeFile_QualityVersion", episodeFile.Quality.Revision.Version.ToString()); - environmentVariables.Add("Sonarr_EpisodeFile_ReleaseGroup", episodeFile.ReleaseGroup ?? string.Empty); - environmentVariables.Add("Sonarr_EpisodeFile_SceneName", episodeFile.SceneName ?? string.Empty); - environmentVariables.Add("Sonarr_EpisodeFile_SourcePath", sourcePath); - environmentVariables.Add("Sonarr_EpisodeFile_SourceFolder", Path.GetDirectoryName(sourcePath)); + environmentVariables.Add("Radarr_EventType", "Download"); + environmentVariables.Add("Radarr_Movie_Id", movie.Id.ToString()); + environmentVariables.Add("Radarr_Movie_Title", movie.Title); + environmentVariables.Add("Radarr_Movie_ImdbId", movie.ImdbId.ToString()); + environmentVariables.Add("Radarr_MovieFile_Id", movieFile.Id.ToString()); + environmentVariables.Add("Radarr_MovieFile_RelativePath", movieFile.RelativePath); + environmentVariables.Add("Radarr_MovieFile_Path", Path.Combine(movie.Path, movieFile.RelativePath)); + environmentVariables.Add("Radarr_MovieFile_Quality", movieFile.Quality.Quality.Name); + environmentVariables.Add("Radarr_MovieFile_QualityVersion", movieFile.Quality.Revision.Version.ToString()); + environmentVariables.Add("Radarr_MovieFile_ReleaseGroup", movieFile.ReleaseGroup ?? string.Empty); + environmentVariables.Add("Radarr_MovieFile_SceneName", movieFile.SceneName ?? string.Empty); + environmentVariables.Add("Radarr_MovieFile_SourcePath", sourcePath); + environmentVariables.Add("Radarr_MovieFile_SourceFolder", Path.GetDirectoryName(sourcePath)); ExecuteScript(environmentVariables); } + public override void OnMovieRename(Movie movie) + { + var environmentVariables = new StringDictionary(); + + environmentVariables.Add("Radarr_EventType", "Rename"); + environmentVariables.Add("Radarr_Movie_Id", movie.Id.ToString()); + environmentVariables.Add("Radarr_Movie_Title", movie.Title); + environmentVariables.Add("Radarr_Movie_Path", movie.Path); + environmentVariables.Add("Radarr_Movie_TvdbId", movie.ImdbId.ToString()); + ExecuteScript(environmentVariables); + } + public override void OnRename(Series series) { var environmentVariables = new StringDictionary(); - environmentVariables.Add("Sonarr_EventType", "Rename"); - environmentVariables.Add("Sonarr_Series_Id", series.Id.ToString()); - environmentVariables.Add("Sonarr_Series_Title", series.Title); - environmentVariables.Add("Sonarr_Series_Path", series.Path); - environmentVariables.Add("Sonarr_Series_TvdbId", series.TvdbId.ToString()); - environmentVariables.Add("Sonarr_Series_Type", series.SeriesType.ToString()); + environmentVariables.Add("Radarr_EventType", "Rename"); + environmentVariables.Add("Radarr_Series_Id", series.Id.ToString()); + environmentVariables.Add("Radarr_Series_Title", series.Title); + environmentVariables.Add("Radarr_Series_Path", series.Path); + environmentVariables.Add("Radarr_Series_TvdbId", series.TvdbId.ToString()); + environmentVariables.Add("Radarr_Series_Type", series.SeriesType.ToString()); ExecuteScript(environmentVariables); } diff --git a/src/NzbDrone.Core/Notifications/DownloadMessage.cs b/src/NzbDrone.Core/Notifications/DownloadMessage.cs index a16ecea80..dd9343eeb 100644 --- a/src/NzbDrone.Core/Notifications/DownloadMessage.cs +++ b/src/NzbDrone.Core/Notifications/DownloadMessage.cs @@ -8,8 +8,11 @@ namespace NzbDrone.Core.Notifications { public string Message { get; set; } public Series Series { get; set; } + public Movie Movie { get; set; } public EpisodeFile EpisodeFile { get; set; } public List OldFiles { get; set; } + public MovieFile MovieFile { get; set; } + public List OldMovieFiles { get; set; } public string SourcePath { get; set; } public override string ToString() diff --git a/src/NzbDrone.Core/Notifications/Email/Email.cs b/src/NzbDrone.Core/Notifications/Email/Email.cs index 27e991332..06cb6b250 100644 --- a/src/NzbDrone.Core/Notifications/Email/Email.cs +++ b/src/NzbDrone.Core/Notifications/Email/Email.cs @@ -18,7 +18,7 @@ namespace NzbDrone.Core.Notifications.Email public override void OnGrab(GrabMessage grabMessage) { - const string subject = "Radarr [TV] - Grabbed"; + const string subject = "Radarr [Movie] - Grabbed"; var body = string.Format("{0} sent to queue.", grabMessage.Message); _emailService.SendEmail(Settings, subject, body); @@ -26,12 +26,16 @@ namespace NzbDrone.Core.Notifications.Email public override void OnDownload(DownloadMessage message) { - const string subject = "Radarr [TV] - Downloaded"; + const string subject = "Radarr [Movie] - Downloaded"; var body = string.Format("{0} Downloaded and sorted.", message.Message); _emailService.SendEmail(Settings, subject, body); } - + + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { } diff --git a/src/NzbDrone.Core/Notifications/GrabMessage.cs b/src/NzbDrone.Core/Notifications/GrabMessage.cs index e62dbe701..d2a2ac25d 100644 --- a/src/NzbDrone.Core/Notifications/GrabMessage.cs +++ b/src/NzbDrone.Core/Notifications/GrabMessage.cs @@ -8,6 +8,8 @@ namespace NzbDrone.Core.Notifications { public string Message { get; set; } public Series Series { get; set; } + public Movie Movie { get; set; } + public RemoteMovie RemoteMovie { get; set; } public RemoteEpisode Episode { get; set; } public QualityModel Quality { get; set; } diff --git a/src/NzbDrone.Core/Notifications/Growl/Growl.cs b/src/NzbDrone.Core/Notifications/Growl/Growl.cs index 99b43f625..85d1cb012 100644 --- a/src/NzbDrone.Core/Notifications/Growl/Growl.cs +++ b/src/NzbDrone.Core/Notifications/Growl/Growl.cs @@ -18,18 +18,22 @@ namespace NzbDrone.Core.Notifications.Growl public override void OnGrab(GrabMessage grabMessage) { - const string title = "Episode Grabbed"; + const string title = "Movie Grabbed"; _growlService.SendNotification(title, grabMessage.Message, "GRAB", Settings.Host, Settings.Port, Settings.Password); } public override void OnDownload(DownloadMessage message) { - const string title = "Episode Downloaded"; + const string title = "Movie Downloaded"; _growlService.SendNotification(title, message.Message, "DOWNLOAD", Settings.Host, Settings.Port, Settings.Password); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { } diff --git a/src/NzbDrone.Core/Notifications/INotification.cs b/src/NzbDrone.Core/Notifications/INotification.cs index 7c4e105b9..ec3ef1464 100644 --- a/src/NzbDrone.Core/Notifications/INotification.cs +++ b/src/NzbDrone.Core/Notifications/INotification.cs @@ -10,6 +10,7 @@ namespace NzbDrone.Core.Notifications void OnGrab(GrabMessage grabMessage); void OnDownload(DownloadMessage message); void OnRename(Series series); + void OnMovieRename(Movie movie); bool SupportsOnGrab { get; } bool SupportsOnDownload { get; } bool SupportsOnUpgrade { get; } diff --git a/src/NzbDrone.Core/Notifications/Join/Join.cs b/src/NzbDrone.Core/Notifications/Join/Join.cs index 4e1f81105..ae392e5df 100644 --- a/src/NzbDrone.Core/Notifications/Join/Join.cs +++ b/src/NzbDrone.Core/Notifications/Join/Join.cs @@ -18,18 +18,22 @@ namespace NzbDrone.Core.Notifications.Join public override void OnGrab(GrabMessage grabMessage) { - const string title = "Radarr - Episode Grabbed"; + const string title = "Radarr - Movie Grabbed"; _proxy.SendNotification(title, grabMessage.Message, Settings); } public override void OnDownload(DownloadMessage message) { - const string title = "Radarr - Episode Downloaded"; + const string title = "Radarr - Movie Downloaded"; _proxy.SendNotification(title, message.Message, Settings); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { } diff --git a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowser.cs b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowser.cs index 7c68fc306..b47385736 100644 --- a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowser.cs +++ b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowser.cs @@ -18,7 +18,7 @@ namespace NzbDrone.Core.Notifications.MediaBrowser public override void OnGrab(GrabMessage grabMessage) { - const string title = "Radarr - Grabbed"; + const string title = "Radarr - Movie Grabbed"; if (Settings.Notify) { @@ -28,7 +28,7 @@ namespace NzbDrone.Core.Notifications.MediaBrowser public override void OnDownload(DownloadMessage message) { - const string title = "Radarr - Downloaded"; + const string title = "Radarr - Movie Downloaded"; if (Settings.Notify) { @@ -41,6 +41,10 @@ namespace NzbDrone.Core.Notifications.MediaBrowser } } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { if (Settings.UpdateLibrary) diff --git a/src/NzbDrone.Core/Notifications/NotificationBase.cs b/src/NzbDrone.Core/Notifications/NotificationBase.cs index 197fadae0..c6a415cda 100644 --- a/src/NzbDrone.Core/Notifications/NotificationBase.cs +++ b/src/NzbDrone.Core/Notifications/NotificationBase.cs @@ -24,6 +24,7 @@ namespace NzbDrone.Core.Notifications public abstract void OnGrab(GrabMessage grabMessage); public abstract void OnDownload(DownloadMessage message); public abstract void OnRename(Series series); + public abstract void OnMovieRename(Movie movie); public virtual bool SupportsOnGrab => true; public virtual bool SupportsOnDownload => true; diff --git a/src/NzbDrone.Core/Notifications/NotificationService.cs b/src/NzbDrone.Core/Notifications/NotificationService.cs index 6ae201fb2..ffad0cbe5 100644 --- a/src/NzbDrone.Core/Notifications/NotificationService.cs +++ b/src/NzbDrone.Core/Notifications/NotificationService.cs @@ -15,7 +15,11 @@ namespace NzbDrone.Core.Notifications public class NotificationService : IHandle, IHandle, - IHandle + IHandle, + IHandle, + IHandle, + IHandle + { private readonly INotificationFactory _notificationFactory; private readonly Logger _logger; @@ -67,6 +71,41 @@ namespace NzbDrone.Core.Notifications qualityString); } + private string GetMessage(Movie movie, QualityModel quality) + { + var qualityString = quality.Quality.ToString(); + + if (quality.Revision.Version > 1) + { + qualityString += " Proper"; + } + + return string.Format("{0}[{1}]", + movie.Title, + qualityString); + } + + private bool ShouldHandleMovie(ProviderDefinition definition, Movie movie) + { + var notificationDefinition = (NotificationDefinition)definition; + + if (notificationDefinition.Tags.Empty()) + { + _logger.Debug("No tags set for this notification."); + return true; + } + + if (notificationDefinition.Tags.Intersect(movie.Tags).Any()) + { + _logger.Debug("Notification and series have one or more matching tags."); + return true; + } + + //TODO: this message could be more clear + _logger.Debug("{0} does not have any tags that match {1}'s tags", notificationDefinition.Name, movie.Title); + return false; + } + private bool ShouldHandleSeries(ProviderDefinition definition, Series series) { var notificationDefinition = (NotificationDefinition) definition; @@ -112,6 +151,33 @@ namespace NzbDrone.Core.Notifications } } + public void Handle(MovieGrabbedEvent message) + { + var grabMessage = new GrabMessage + { + Message = GetMessage(message.Movie.Movie, message.Movie.ParsedMovieInfo.Quality), + Series = null, + Quality = message.Movie.ParsedMovieInfo.Quality, + Episode = null, + Movie = message.Movie.Movie, + RemoteMovie = message.Movie + }; + + foreach (var notification in _notificationFactory.OnGrabEnabled()) + { + try + { + if (!ShouldHandleMovie(notification.Definition, message.Movie.Movie)) continue; + notification.OnGrab(grabMessage); + } + + catch (Exception ex) + { + _logger.Error(ex, "Unable to send OnGrab notification to: " + notification.Definition.Name); + } + } + } + public void Handle(EpisodeDownloadedEvent message) { var downloadMessage = new DownloadMessage(); @@ -141,6 +207,36 @@ namespace NzbDrone.Core.Notifications } } + public void Handle(MovieDownloadedEvent message) + { + var downloadMessage = new DownloadMessage(); + downloadMessage.Message = GetMessage(message.Movie.Movie, message.Movie.ParsedMovieInfo.Quality); + downloadMessage.Series = null; + downloadMessage.EpisodeFile = null; + downloadMessage.Movie = message.Movie.Movie; + downloadMessage.OldMovieFiles = message.OldFiles; + downloadMessage.SourcePath = message.Movie.Path; + + foreach (var notification in _notificationFactory.OnDownloadEnabled()) + { + try + { + if (ShouldHandleMovie(notification.Definition, message.Movie.Movie)) + { + if (downloadMessage.OldMovieFiles.Empty() || ((NotificationDefinition)notification.Definition).OnUpgrade) + { + notification.OnDownload(downloadMessage); + } + } + } + + catch (Exception ex) + { + _logger.Warn(ex, "Unable to send OnDownload notification to: " + notification.Definition.Name); + } + } + } + public void Handle(SeriesRenamedEvent message) { foreach (var notification in _notificationFactory.OnRenameEnabled()) @@ -159,5 +255,24 @@ namespace NzbDrone.Core.Notifications } } } + + public void Handle(MovieRenamedEvent message) + { + foreach (var notification in _notificationFactory.OnRenameEnabled()) + { + try + { + if (ShouldHandleMovie(notification.Definition, message.Movie)) + { + notification.OnMovieRename(message.Movie); + } + } + + catch (Exception ex) + { + _logger.Warn(ex, "Unable to send OnRename notification to: " + notification.Definition.Name); + } + } + } } } diff --git a/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroid.cs b/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroid.cs index 176612065..502fa8f5f 100644 --- a/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroid.cs +++ b/src/NzbDrone.Core/Notifications/NotifyMyAndroid/NotifyMyAndroid.cs @@ -19,18 +19,22 @@ namespace NzbDrone.Core.Notifications.NotifyMyAndroid public override void OnGrab(GrabMessage grabMessage) { - const string title = "Episode Grabbed"; + const string title = "Movie Grabbed"; _proxy.SendNotification(title, grabMessage.Message, Settings.ApiKey, (NotifyMyAndroidPriority)Settings.Priority); } public override void OnDownload(DownloadMessage message) { - const string title = "Episode Downloaded"; + const string title = "Movie Downloaded"; _proxy.SendNotification(title, message.Message, Settings.ApiKey, (NotifyMyAndroidPriority)Settings.Priority); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { } diff --git a/src/NzbDrone.Core/Notifications/Plex/PlexClient.cs b/src/NzbDrone.Core/Notifications/Plex/PlexClient.cs index e38e87f96..a330468a4 100644 --- a/src/NzbDrone.Core/Notifications/Plex/PlexClient.cs +++ b/src/NzbDrone.Core/Notifications/Plex/PlexClient.cs @@ -28,6 +28,10 @@ namespace NzbDrone.Core.Notifications.Plex _plexClientService.Notify(Settings, header, message.Message); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { } diff --git a/src/NzbDrone.Core/Notifications/Plex/PlexHomeTheater.cs b/src/NzbDrone.Core/Notifications/Plex/PlexHomeTheater.cs index e96c2c4f2..817d4f50c 100644 --- a/src/NzbDrone.Core/Notifications/Plex/PlexHomeTheater.cs +++ b/src/NzbDrone.Core/Notifications/Plex/PlexHomeTheater.cs @@ -35,6 +35,10 @@ namespace NzbDrone.Core.Notifications.Plex Notify(Settings, header, message.Message); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { diff --git a/src/NzbDrone.Core/Notifications/Plex/PlexServer.cs b/src/NzbDrone.Core/Notifications/Plex/PlexServer.cs index 2f3da8822..7d086e90a 100644 --- a/src/NzbDrone.Core/Notifications/Plex/PlexServer.cs +++ b/src/NzbDrone.Core/Notifications/Plex/PlexServer.cs @@ -25,6 +25,10 @@ namespace NzbDrone.Core.Notifications.Plex UpdateIfEnabled(message.Series); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { UpdateIfEnabled(series); diff --git a/src/NzbDrone.Core/Notifications/Prowl/Prowl.cs b/src/NzbDrone.Core/Notifications/Prowl/Prowl.cs index 59bba6f43..17357df0d 100644 --- a/src/NzbDrone.Core/Notifications/Prowl/Prowl.cs +++ b/src/NzbDrone.Core/Notifications/Prowl/Prowl.cs @@ -19,18 +19,22 @@ namespace NzbDrone.Core.Notifications.Prowl public override void OnGrab(GrabMessage grabMessage) { - const string title = "Episode Grabbed"; + const string title = "Movie Grabbed"; _prowlService.SendNotification(title, grabMessage.Message, Settings.ApiKey, (NotificationPriority)Settings.Priority); } public override void OnDownload(DownloadMessage message) { - const string title = "Episode Downloaded"; + const string title = "Movie Downloaded"; _prowlService.SendNotification(title, message.Message, Settings.ApiKey, (NotificationPriority)Settings.Priority); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { } diff --git a/src/NzbDrone.Core/Notifications/PushBullet/PushBullet.cs b/src/NzbDrone.Core/Notifications/PushBullet/PushBullet.cs index be2afe912..b8a2e9736 100644 --- a/src/NzbDrone.Core/Notifications/PushBullet/PushBullet.cs +++ b/src/NzbDrone.Core/Notifications/PushBullet/PushBullet.cs @@ -18,18 +18,22 @@ namespace NzbDrone.Core.Notifications.PushBullet public override void OnGrab(GrabMessage grabMessage) { - const string title = "Radarr - Episode Grabbed"; + const string title = "Radarr - Movie Grabbed"; _proxy.SendNotification(title, grabMessage.Message, Settings); } public override void OnDownload(DownloadMessage message) { - const string title = "Radarr - Episode Downloaded"; + const string title = "Radarr - Movie Downloaded"; _proxy.SendNotification(title, message.Message, Settings); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { } diff --git a/src/NzbDrone.Core/Notifications/Pushalot/Pushalot.cs b/src/NzbDrone.Core/Notifications/Pushalot/Pushalot.cs index f2969952a..953c08a8c 100644 --- a/src/NzbDrone.Core/Notifications/Pushalot/Pushalot.cs +++ b/src/NzbDrone.Core/Notifications/Pushalot/Pushalot.cs @@ -18,18 +18,22 @@ namespace NzbDrone.Core.Notifications.Pushalot public override void OnGrab(GrabMessage grabMessage) { - const string title = "Episode Grabbed"; + const string title = "Movie Grabbed"; _proxy.SendNotification(title, grabMessage.Message, Settings); } public override void OnDownload(DownloadMessage message) { - const string title = "Episode Downloaded"; + const string title = "Movie Downloaded"; _proxy.SendNotification(title, message.Message, Settings); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { } diff --git a/src/NzbDrone.Core/Notifications/Pushover/Pushover.cs b/src/NzbDrone.Core/Notifications/Pushover/Pushover.cs index ee8f61053..d590099f5 100644 --- a/src/NzbDrone.Core/Notifications/Pushover/Pushover.cs +++ b/src/NzbDrone.Core/Notifications/Pushover/Pushover.cs @@ -18,18 +18,22 @@ namespace NzbDrone.Core.Notifications.Pushover public override void OnGrab(GrabMessage grabMessage) { - const string title = "Episode Grabbed"; + const string title = "Movie Grabbed"; _proxy.SendNotification(title, grabMessage.Message, Settings); } public override void OnDownload(DownloadMessage message) { - const string title = "Episode Downloaded"; + const string title = "Movie Downloaded"; _proxy.SendNotification(title, message.Message, Settings); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { } diff --git a/src/NzbDrone.Core/Notifications/Slack/Slack.cs b/src/NzbDrone.Core/Notifications/Slack/Slack.cs index 5e581a25f..d2038aea1 100644 --- a/src/NzbDrone.Core/Notifications/Slack/Slack.cs +++ b/src/NzbDrone.Core/Notifications/Slack/Slack.cs @@ -69,6 +69,10 @@ namespace NzbDrone.Core.Notifications.Slack NotifySlack(payload); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { var payload = new SlackPayload diff --git a/src/NzbDrone.Core/Notifications/Synology/SynologyIndexer.cs b/src/NzbDrone.Core/Notifications/Synology/SynologyIndexer.cs index 4994ce00a..c406252fc 100644 --- a/src/NzbDrone.Core/Notifications/Synology/SynologyIndexer.cs +++ b/src/NzbDrone.Core/Notifications/Synology/SynologyIndexer.cs @@ -42,6 +42,10 @@ namespace NzbDrone.Core.Notifications.Synology } } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { if (Settings.UpdateLibrary) diff --git a/src/NzbDrone.Core/Notifications/Telegram/Telegram.cs b/src/NzbDrone.Core/Notifications/Telegram/Telegram.cs index 240008c5e..477872409 100644 --- a/src/NzbDrone.Core/Notifications/Telegram/Telegram.cs +++ b/src/NzbDrone.Core/Notifications/Telegram/Telegram.cs @@ -18,18 +18,22 @@ namespace NzbDrone.Core.Notifications.Telegram public override void OnGrab(GrabMessage grabMessage) { - const string title = "Episode Grabbed"; + const string title = "Movie Grabbed"; _proxy.SendNotification(title, grabMessage.Message, Settings); } public override void OnDownload(DownloadMessage message) { - const string title = "Episode Downloaded"; + const string title = "Movie Downloaded"; _proxy.SendNotification(title, message.Message, Settings); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { } diff --git a/src/NzbDrone.Core/Notifications/Twitter/Twitter.cs b/src/NzbDrone.Core/Notifications/Twitter/Twitter.cs index b19c7725f..e789654dc 100644 --- a/src/NzbDrone.Core/Notifications/Twitter/Twitter.cs +++ b/src/NzbDrone.Core/Notifications/Twitter/Twitter.cs @@ -29,6 +29,10 @@ namespace NzbDrone.Core.Notifications.Twitter _twitterService.SendNotification($"Imported: {message.Message}", Settings); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { } diff --git a/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs b/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs index 4bfcb867c..74ae13f89 100644 --- a/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/Webhook.cs @@ -27,6 +27,10 @@ namespace NzbDrone.Core.Notifications.Webhook _service.OnDownload(message.Series, message.EpisodeFile, Settings); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { _service.OnRename(series, Settings); diff --git a/src/NzbDrone.Core/Notifications/Xbmc/Xbmc.cs b/src/NzbDrone.Core/Notifications/Xbmc/Xbmc.cs index 08fdbfaa4..4939fbe3d 100644 --- a/src/NzbDrone.Core/Notifications/Xbmc/Xbmc.cs +++ b/src/NzbDrone.Core/Notifications/Xbmc/Xbmc.cs @@ -36,6 +36,10 @@ namespace NzbDrone.Core.Notifications.Xbmc UpdateAndClean(message.Series, message.OldFiles.Any()); } + public override void OnMovieRename(Movie movie) + { + } + public override void OnRename(Series series) { UpdateAndClean(series);