diff --git a/src/NzbDrone.Core/IndexerSearch/Definitions/TvSearchCriteria.cs b/src/NzbDrone.Core/IndexerSearch/Definitions/TvSearchCriteria.cs index a2b16824f..d4c13c863 100644 --- a/src/NzbDrone.Core/IndexerSearch/Definitions/TvSearchCriteria.cs +++ b/src/NzbDrone.Core/IndexerSearch/Definitions/TvSearchCriteria.cs @@ -114,7 +114,7 @@ namespace NzbDrone.Core.IndexerSearch.Definitions string episodeString; if (DateTime.TryParseExact($"{Season} {Episode}", "yyyy MM/dd", CultureInfo.InvariantCulture, DateTimeStyles.None, out var showDate)) { - episodeString = showDate.ToString("yyyy.MM.dd"); + episodeString = showDate.ToString("yyyy.MM.dd", CultureInfo.InvariantCulture); } else if (Episode.IsNullOrWhiteSpace()) { diff --git a/src/NzbDrone.Core/Indexers/Definitions/BroadcastheNet/BroadcastheNetRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Definitions/BroadcastheNet/BroadcastheNetRequestGenerator.cs index 74d7d7251..9b6d93499 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/BroadcastheNet/BroadcastheNetRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/BroadcastheNet/BroadcastheNetRequestGenerator.cs @@ -74,7 +74,7 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet else if (DateTime.TryParseExact($"{searchCriteria.Season} {searchCriteria.Episode}", "yyyy MM/dd", CultureInfo.InvariantCulture, DateTimeStyles.None, out var showDate)) { // Daily Episode - parameters.Name = showDate.ToString("yyyy.MM.dd"); + parameters.Name = showDate.ToString("yyyy.MM.dd", CultureInfo.InvariantCulture); parameters.Category = "Episode"; pageableRequests.Add(GetPagedRequests(parameters, btnResults, btnOffset)); } diff --git a/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsRequestGenerator.cs index c94595221..87e24b1c2 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsRequestGenerator.cs @@ -66,7 +66,7 @@ namespace NzbDrone.Core.Indexers.Definitions.HDBits if (DateTime.TryParseExact($"{searchCriteria.Season} {searchCriteria.Episode}", "yyyy MM/dd", CultureInfo.InvariantCulture, DateTimeStyles.None, out var showDate)) { - query.Search = showDate.ToString("yyyy-MM-dd"); + query.Search = showDate.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture); } else { diff --git a/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs b/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs index f507b7fc6..2d2b8508e 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Nebulance.cs @@ -41,7 +41,7 @@ namespace NzbDrone.Core.Indexers.Definitions public override IIndexerRequestGenerator GetRequestGenerator() { - return new NebulanceRequestGenerator(Settings); + return new NebulanceRequestGenerator(Settings, _logger); } public override IParseIndexerResponse GetParser() @@ -90,10 +90,12 @@ namespace NzbDrone.Core.Indexers.Definitions public class NebulanceRequestGenerator : IIndexerRequestGenerator { private readonly NebulanceSettings _settings; + private readonly Logger _logger; - public NebulanceRequestGenerator(NebulanceSettings settings) + public NebulanceRequestGenerator(NebulanceSettings settings, Logger logger) { _settings = settings; + _logger = logger; } public IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria) @@ -149,6 +151,17 @@ namespace NzbDrone.Core.Indexers.Definitions } } + if ((queryParams.Season.HasValue || queryParams.Episode.HasValue) && + queryParams.Name.IsNullOrWhiteSpace() && + queryParams.Release.IsNullOrWhiteSpace() && + !queryParams.TvMaze.HasValue && + queryParams.Imdb.IsNullOrWhiteSpace()) + { + _logger.Debug("NBL API does not support season calls without name, series, id, imdb, tvmaze, or time keys."); + + return new IndexerPageableRequestChain(); + } + pageableRequests.Add(GetPagedRequests(queryParams, searchCriteria.Limit, searchCriteria.Offset)); return pageableRequests;