Fixed: nullref fingerprinting

This commit is contained in:
bakerboy448 2025-10-04 14:44:56 -05:00
parent 71ea85681f
commit 4baba902ea

View file

@ -155,9 +155,9 @@ 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;
.Select(x => x.Value.Item2.NormalizedDistance())
.DefaultIfEmpty(1.0)
.Max();
if (localAlbumRelease.Distance.NormalizedDistance() > 0.15 ||
localAlbumRelease.TrackMapping.LocalExtra.Any() ||