Prevent Sequence contains no elements when album isn't synced to Lidarr

This commit is contained in:
Bogdan 2023-06-29 08:56:10 +03:00
commit 3066c80dc9

View file

@ -155,6 +155,7 @@ namespace NzbDrone.Core.MediaFiles.TrackImport.Identification
private bool ShouldFingerprint(LocalAlbumRelease localAlbumRelease)
{
var worstTrackMatchDist = localAlbumRelease.TrackMapping?.Mapping
.DefaultIfEmpty()
.MaxBy(x => x.Value.Item2.NormalizedDistance())
.Value.Item2.NormalizedDistance() ?? 1.0;