From 3066c80dc9a0f1c28dcacdbf3cc481288726c8b7 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Thu, 29 Jun 2023 08:56:10 +0300 Subject: [PATCH] Prevent `Sequence contains no elements` when album isn't synced to Lidarr --- .../TrackImport/Identification/IdentificationService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/NzbDrone.Core/MediaFiles/TrackImport/Identification/IdentificationService.cs b/src/NzbDrone.Core/MediaFiles/TrackImport/Identification/IdentificationService.cs index fe6ec82f0..ccd0b3939 100644 --- a/src/NzbDrone.Core/MediaFiles/TrackImport/Identification/IdentificationService.cs +++ b/src/NzbDrone.Core/MediaFiles/TrackImport/Identification/IdentificationService.cs @@ -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;