mirror of
https://github.com/Lidarr/Lidarr
synced 2025-12-15 21:06:24 +01:00
Fixed: nullref fingerprinting
This commit is contained in:
parent
71ea85681f
commit
4baba902ea
1 changed files with 3 additions and 3 deletions
|
|
@ -155,9 +155,9 @@ private bool FingerprintingAllowed(bool newDownload)
|
||||||
private bool ShouldFingerprint(LocalAlbumRelease localAlbumRelease)
|
private bool ShouldFingerprint(LocalAlbumRelease localAlbumRelease)
|
||||||
{
|
{
|
||||||
var worstTrackMatchDist = localAlbumRelease.TrackMapping?.Mapping
|
var worstTrackMatchDist = localAlbumRelease.TrackMapping?.Mapping
|
||||||
.DefaultIfEmpty()
|
.Select(x => x.Value.Item2.NormalizedDistance())
|
||||||
.MaxBy(x => x.Value.Item2.NormalizedDistance())
|
.DefaultIfEmpty(1.0)
|
||||||
.Value.Item2.NormalizedDistance() ?? 1.0;
|
.Max();
|
||||||
|
|
||||||
if (localAlbumRelease.Distance.NormalizedDistance() > 0.15 ||
|
if (localAlbumRelease.Distance.NormalizedDistance() > 0.15 ||
|
||||||
localAlbumRelease.TrackMapping.LocalExtra.Any() ||
|
localAlbumRelease.TrackMapping.LocalExtra.Any() ||
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue