Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the song name matching rules in YouTube music #1518

Merged
merged 1 commit into from
May 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spotdl/providers/ytm_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def search_and_get_best_match(
if len(isrc_results) == 1:
isrc_result = isrc_results[0]

name_match = isrc_result["name"].lower() == song_name.lower()
name_match = _match_percentage(isrc_result["name"].lower(), song_name.lower())

delta = isrc_result["length"] - song_duration
non_match_value = (delta**2) / song_duration * 100
Expand All @@ -56,7 +56,7 @@ def search_and_get_best_match(
if (
isrc_result is not None
and "link" in isrc_result
and name_match
and name_match > 90
and time_match > 90
):
return isrc_result["link"]
Expand Down