From e03289abe76c72046b93a73bab3afd557912177c Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 17 Dec 2024 17:05:39 -0800 Subject: [PATCH] Fixed: Prevent exception when grabbing unparsable release (cherry picked from commit 9a69222c9a1c42c2571f21e2d4a2e02b90216248) Closes #10789 --- src/NzbDrone.Core/Parser/Parser.cs | 5 +++++ src/Radarr.Api.V3/Indexers/ReleaseController.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index c9f4668d29..6b492aa09b 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -465,6 +465,11 @@ public static string ToUrlSlug(string value, bool invalidDashReplacement = false public static string CleanMovieTitle(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/Radarr.Api.V3/Indexers/ReleaseController.cs b/src/Radarr.Api.V3/Indexers/ReleaseController.cs index 3130b2d4f0..c5f991b5b5 100644 --- a/src/Radarr.Api.V3/Indexers/ReleaseController.cs +++ b/src/Radarr.Api.V3/Indexers/ReleaseController.cs @@ -109,7 +109,7 @@ public async Task DownloadRelease([FromBody] ReleaseResource release) } else { - throw new NzbDroneClientException(HttpStatusCode.NotFound, "Unable to find matching movie"); + throw new NzbDroneClientException(HttpStatusCode.NotFound, "Unable to find matching movie, will need to be manually provided"); } }