diff --git a/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs index db6acc744b..8a25f064c6 100644 --- a/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Newznab/NewznabRequestGenerator.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Net; using NzbDrone.Common.Extensions; using NzbDrone.Common.Http; using NzbDrone.Core.IndexerSearch.Definitions; @@ -57,37 +58,12 @@ public IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchC } else { - pageableRequests.Add(GetPagedRequests(MaxPages, Settings.Categories, "search", $"&q={System.Web.HttpUtility.UrlPathEncode(Parser.Parser.NormalizeTitle(searchCriteria.Movie.Title))}%20{searchCriteria.Movie.Year}")); + pageableRequests.Add(GetPagedRequests(MaxPages, Settings.Categories, "search", $"&q={Parser.Parser.NormalizeTitle(searchCriteria.Movie.Title)}%20{searchCriteria.Movie.Year}")); } return pageableRequests; } - public virtual IndexerPageableRequestChain GetSearchRequests(SingleEpisodeSearchCriteria searchCriteria) - { - return new IndexerPageableRequestChain(); - } - - public virtual IndexerPageableRequestChain GetSearchRequests(SeasonSearchCriteria searchCriteria) - { - return new IndexerPageableRequestChain(); - } - - public virtual IndexerPageableRequestChain GetSearchRequests(DailyEpisodeSearchCriteria searchCriteria) - { - return new IndexerPageableRequestChain(); - } - - public virtual IndexerPageableRequestChain GetSearchRequests(AnimeEpisodeSearchCriteria searchCriteria) - { - return new IndexerPageableRequestChain(); - } - - public virtual IndexerPageableRequestChain GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria) - { - return new IndexerPageableRequestChain(); - } - private IEnumerable GetPagedRequests(int maxPages, IEnumerable categories, string searchType, string parameters) { if (categories.Empty()) @@ -117,9 +93,30 @@ private IEnumerable GetPagedRequests(int maxPages, IEnumerable DefaultDefinitions - { - get - { - var config = (CouchPotatoSettings)new CouchPotatoSettings(); - config.Link = "http://localhost"; - config.Port = "5050"; - - yield return new NetImportDefinition - { - Name = "Localhost", - Enabled = config.Validate().IsValid && Enabled, - Implementation = GetType().Name, - Settings = config - }; - } - }*/ - public override INetImportRequestGenerator GetRequestGenerator() { return new CouchPotatoRequestGenerator() { Settings = Settings }; diff --git a/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoParser.cs b/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoParser.cs index 05a195f1e5..94ba0a27f2 100644 --- a/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoParser.cs +++ b/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoParser.cs @@ -15,8 +15,6 @@ public class CouchPotatoParser : IParseNetImportResponse private NetImportResponse _importResponse; private readonly Logger _logger; - private static readonly Regex ReplaceEntities = new Regex("&[a-z]+;", RegexOptions.Compiled | RegexOptions.IgnoreCase); - public CouchPotatoParser(CouchPotatoSettings settings) { _settings = settings; diff --git a/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoSettings.cs b/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoSettings.cs index 5e05621fb5..8e9a6eb439 100644 --- a/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoSettings.cs +++ b/src/NzbDrone.Core/NetImport/CouchPotato/CouchPotatoSettings.cs @@ -34,8 +34,7 @@ public CouchPotatoSettings() [FieldDefinition(1, Label = "CouchPotato Port", HelpText = "Port your CoouchPootato uses.")] public int Port { get; set; } - [FieldDefinition(2, Label = "CouchPotato Url Base", - HelpText = "UrlBase your CoouchPootato uses, leave blank for none")] + [FieldDefinition(2, Label = "CouchPotato Url Base", HelpText = "UrlBase your CoouchPootato uses, leave blank for none")] public string UrlBase { get; set; } [FieldDefinition(3, Label = "CouchPotato API Key", HelpText = "CoouchPootato API Key.")] diff --git a/src/NzbDrone.Core/NetImport/TMDb/TMDbParser.cs b/src/NzbDrone.Core/NetImport/TMDb/TMDbParser.cs index 1f0589c821..beb8ad0137 100644 --- a/src/NzbDrone.Core/NetImport/TMDb/TMDbParser.cs +++ b/src/NzbDrone.Core/NetImport/TMDb/TMDbParser.cs @@ -43,6 +43,12 @@ public TMDbParser(TMDbSettings settings) foreach (var movie in jsonResponse.results) { + // Movies with no Year Fix + if (string.IsNullOrWhiteSpace(movie.release_date)) + { + continue; + } + movies.AddIfNotNull(new Tv.Movie() { Title = movie.title, @@ -70,6 +76,12 @@ public TMDbParser(TMDbSettings settings) continue; } + // Movies with no Year Fix + if (string.IsNullOrWhiteSpace(movie.release_date)) + { + continue; + } + movies.AddIfNotNull(new Tv.Movie() { Title = movie.title,