From 6643a334fd34f9ebb27447648436fa34dd2239be Mon Sep 17 00:00:00 2001 From: kuba Date: Sat, 18 Nov 2023 19:13:13 +0100 Subject: [PATCH] fallback to title matching for non verified results when score is lower than 70 --- spotdl/utils/matching.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spotdl/utils/matching.py b/spotdl/utils/matching.py index 46a1f0609..f12b08894 100644 --- a/spotdl/utils/matching.py +++ b/spotdl/utils/matching.py @@ -423,12 +423,13 @@ def artists_match_fixup1(song: Song, result: Result, score: float) -> float: # If artist match is still too low, # we fallback to matching all song artist names # with the result's title - if score <= 50: + if score <= 70: artist_title_match = 0.0 + result_name = slugify(result.name).replace("-", "") for artist in song.artists: slug_artist = slugify(artist).replace("-", "") - if slug_artist in slugify(result.name).replace("-", ""): + if slug_artist in result_name: artist_title_match += 1.0 artist_title_match = (artist_title_match / len(song.artists)) * 100