diff --git a/src/NzbDrone.Core/DataAugmentation/Scene/SceneMappingService.cs b/src/NzbDrone.Core/DataAugmentation/Scene/SceneMappingService.cs index 10aac05ec..b9e568163 100644 --- a/src/NzbDrone.Core/DataAugmentation/Scene/SceneMappingService.cs +++ b/src/NzbDrone.Core/DataAugmentation/Scene/SceneMappingService.cs @@ -94,6 +94,11 @@ public List FindByTvdbId(int tvdbId) public SceneMapping FindSceneMapping(string seriesTitle, string releaseTitle, int sceneSeasonNumber) { + if (seriesTitle.IsNullOrWhiteSpace()) + { + return null; + } + var mappings = FindMappings(seriesTitle, releaseTitle); if (mappings == null) diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 836e52ca1..2b603052e 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -836,6 +836,11 @@ public static string ParseSeriesName(string title) public static string CleanSeriesTitle(this string title) { + if (title.IsNullOrWhiteSpace()) + { + return title; + } + // If Title only contains numbers return it as is. if (long.TryParse(title, out _)) { diff --git a/src/Sonarr.Api.V3/Indexers/ReleaseController.cs b/src/Sonarr.Api.V3/Indexers/ReleaseController.cs index 6de121914..12da7f9ae 100644 --- a/src/Sonarr.Api.V3/Indexers/ReleaseController.cs +++ b/src/Sonarr.Api.V3/Indexers/ReleaseController.cs @@ -127,7 +127,7 @@ public async Task DownloadRelease([FromBody] ReleaseResource release) if (episodes.Empty()) { - throw new NzbDroneClientException(HttpStatusCode.NotFound, "Unable to parse episodes in the release"); + throw new NzbDroneClientException(HttpStatusCode.NotFound, "Unable to parse episodes in the release, will need to be manually provided"); } remoteEpisode.Series = series; @@ -135,7 +135,7 @@ public async Task DownloadRelease([FromBody] ReleaseResource release) } else { - throw new NzbDroneClientException(HttpStatusCode.NotFound, "Unable to find matching series and episodes"); + throw new NzbDroneClientException(HttpStatusCode.NotFound, "Unable to find matching series and episodes, will need to be manually provided"); } } else if (remoteEpisode.Episodes.Empty()) @@ -154,7 +154,7 @@ public async Task DownloadRelease([FromBody] ReleaseResource release) if (remoteEpisode.Episodes.Empty()) { - throw new NzbDroneClientException(HttpStatusCode.NotFound, "Unable to parse episodes in the release"); + throw new NzbDroneClientException(HttpStatusCode.NotFound, "Unable to parse episodes in the release, will need to be manually provided"); } await _downloadService.DownloadReport(remoteEpisode, release.DownloadClientId);