Fixed: Loading queue when there are pending items that were added before upgrading

Fixes #7823

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
pull/7841/head
Qstick 2 years ago
parent f5d6a79998
commit 694940452c

@ -89,6 +89,7 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
.With(h => h.Title = title) .With(h => h.Title = title)
.With(h => h.Release = release) .With(h => h.Release = release)
.With(h => h.Reason = reason) .With(h => h.Reason = reason)
.With(h => h.ParsedMovieInfo = _parsedMovieInfo)
.Build(); .Build();
_heldReleases.AddRange(heldReleases); _heldReleases.AddRange(heldReleases);

@ -52,6 +52,7 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
_pending.Add(new PendingRelease _pending.Add(new PendingRelease
{ {
Id = id, Id = id,
Title = "Movie.Title.2020.720p-Radarr",
ParsedMovieInfo = new ParsedMovieInfo { MovieTitles = new List<string> { title }, Year = year }, ParsedMovieInfo = new ParsedMovieInfo { MovieTitles = new List<string> { title }, Year = year },
MovieId = _movie.Id MovieId = _movie.Id
}); });

@ -283,6 +283,12 @@ namespace NzbDrone.Core.Download.Pending
return null; return null;
} }
// Languages will be empty if added before upgrading to v4, reparsing the languages if they're empty will set it to Unknown or better.
if (release.ParsedMovieInfo.Languages.Empty())
{
release.ParsedMovieInfo.Languages = LanguageParser.ParseLanguages(release.Title);
}
release.RemoteMovie = new RemoteMovie release.RemoteMovie = new RemoteMovie
{ {
Movie = movie, Movie = movie,

Loading…
Cancel
Save