1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-10-02 06:07:19 +02:00

Rejection string improvements

Closes #7611
This commit is contained in:
Qstick 2023-01-22 14:27:15 -06:00
parent 9d1956794e
commit 7906ea2a0c

View File

@ -314,11 +314,13 @@ public string Message
case MappingResultType.Success:
return $"Successfully mapped release name {ReleaseName} to movie {Movie}";
case MappingResultType.NotParsable:
return $"Failed to find movie title in release name {ReleaseName}";
return $"Failed to find movie title and/or year in release name {ReleaseName}";
case MappingResultType.TitleNotFound:
return $"Could not find {RemoteMovie.ParsedMovieInfo.PrimaryMovieTitle}";
case MappingResultType.WrongYear:
return $"Failed to map movie, expected year {RemoteMovie.Movie.MovieMetadata.Value.Year}, but found {RemoteMovie.ParsedMovieInfo.Year}";
var movieYears = new HashSet<int> { RemoteMovie.Movie.MovieMetadata.Value.Year, RemoteMovie.Movie.MovieMetadata.Value.SecondaryYear.GetValueOrDefault() };
return $"Failed to map movie, expected year {string.Join(", ", movieYears.Where(x => x > 0))}, but found {RemoteMovie.ParsedMovieInfo.Year}";
case MappingResultType.WrongTitle:
var comma = RemoteMovie.Movie.MovieMetadata.Value.AlternativeTitles.Count > 0 ? ", " : "";
return