From 09c86013b0cd226bebeb8bdfaf559a6261ae95fd Mon Sep 17 00:00:00 2001 From: Jason Costomiris Date: Mon, 5 Jun 2017 06:06:20 -0400 Subject: [PATCH 1/2] Added: [Radarr] tag for Twitter Notifications (#1558) --- src/NzbDrone.Core/Notifications/Twitter/Twitter.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/Notifications/Twitter/Twitter.cs b/src/NzbDrone.Core/Notifications/Twitter/Twitter.cs index e789654dc..037fb947c 100644 --- a/src/NzbDrone.Core/Notifications/Twitter/Twitter.cs +++ b/src/NzbDrone.Core/Notifications/Twitter/Twitter.cs @@ -21,18 +21,18 @@ namespace NzbDrone.Core.Notifications.Twitter public override void OnGrab(GrabMessage message) { - _twitterService.SendNotification($"Grabbed: {message.Message}", Settings); + _twitterService.SendNotification($"[Radarr] Grabbed: {message.Message}", Settings); } public override void OnDownload(DownloadMessage message) { - _twitterService.SendNotification($"Imported: {message.Message}", Settings); + _twitterService.SendNotification($"[Radarr] Imported: {message.Message}", Settings); } public override void OnMovieRename(Movie movie) { } - + public override void OnRename(Series series) { } From d81e3a79cf4f0ffc5a393cbcaac4ee50b71612d1 Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Mon, 5 Jun 2017 17:48:04 +0200 Subject: [PATCH 2/2] Added: Search 5 alternative titles as well. This should help with french as well as movies with very different titles. --- .../Indexers/Newznab/NewznabRequestGenerator.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs index 9a2c58fab..aa0cd5ad2 100644 --- a/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs @@ -59,7 +59,18 @@ namespace NzbDrone.Core.Indexers.Newznab else { var searchTitle = System.Web.HttpUtility.UrlPathEncode(Parser.Parser.ReplaceGermanUmlauts(Parser.Parser.NormalizeTitle(searchCriteria.Movie.Title))); - pageableRequests.Add(GetPagedRequests(MaxPages, Settings.Categories, "search", $"&q={searchTitle}%20{searchCriteria.Movie.Year}")); + var altTitles = searchCriteria.Movie.AlternativeTitles.DistinctBy(t => Parser.Parser.CleanSeriesTitle(t)).Take(5).ToList(); + + var realMaxPages = (int)MaxPages / (altTitles.Count() + 1); + + pageableRequests.Add(GetPagedRequests(MaxPages - (altTitles.Count() * realMaxPages), Settings.Categories, "search", $"&q={searchTitle}%20{searchCriteria.Movie.Year}")); + + //Also use alt titles for searching. + foreach (String altTitle in altTitles) + { + var searchAltTitle = System.Web.HttpUtility.UrlPathEncode(Parser.Parser.ReplaceGermanUmlauts(Parser.Parser.NormalizeTitle(altTitle))); + pageableRequests.Add(GetPagedRequests(realMaxPages, Settings.Categories, "search", $"&q={searchAltTitle}%20{searchCriteria.Movie.Year}")); + } } return pageableRequests;