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
parent bd531efdba
commit 3066c80dc9

View file

@ -155,6 +155,7 @@ private bool FingerprintingAllowed(bool newDownload)
private bool ShouldFingerprint(LocalAlbumRelease localAlbumRelease)
{
var worstTrackMatchDist = localAlbumRelease.TrackMapping?.Mapping
.DefaultIfEmpty()
.MaxBy(x => x.Value.Item2.NormalizedDistance())
.Value.Item2.NormalizedDistance() ?? 1.0;