mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 14:55:20 -07:00
Fixed: Rare case of null quality causing issues with manual import.
Fixes #2227
This commit is contained in:
parent
d5832a6a07
commit
33cc228ac1
1 changed files with 4 additions and 1 deletions
|
@ -49,13 +49,16 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
|
||||||
{
|
{
|
||||||
_logger.Debug("Decisions: {0}", decisions.Count);
|
_logger.Debug("Decisions: {0}", decisions.Count);
|
||||||
|
|
||||||
|
//I added a null op for the rare case that the quality is null. TODO: find out why that would even happen in the first place.
|
||||||
var qualifiedImports = decisions.Where(c => c.Approved)
|
var qualifiedImports = decisions.Where(c => c.Approved)
|
||||||
.GroupBy(c => c.LocalMovie.Movie.Id, (i, s) => s
|
.GroupBy(c => c.LocalMovie.Movie.Id, (i, s) => s
|
||||||
.OrderByDescending(c => c.LocalMovie.Quality, new QualityModelComparer(s.First().LocalMovie.Movie.Profile))
|
.OrderByDescending(c => c.LocalMovie.Quality ?? new QualityModel{Quality = Quality.Unknown}, new QualityModelComparer(s.First().LocalMovie.Movie.Profile))
|
||||||
.ThenByDescending(c => c.LocalMovie.Size))
|
.ThenByDescending(c => c.LocalMovie.Size))
|
||||||
.SelectMany(c => c)
|
.SelectMany(c => c)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var importResults = new List<ImportResult>();
|
var importResults = new List<ImportResult>();
|
||||||
|
|
||||||
foreach (var importDecision in qualifiedImports.OrderBy(e => e.LocalMovie.Size)
|
foreach (var importDecision in qualifiedImports.OrderBy(e => e.LocalMovie.Size)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue