Skip to content

Commit

Permalink
Update for latest version of ytmusicapi
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed Dec 18, 2020
1 parent 6bd5e6e commit 91a8baa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions YouTube.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ def get_best_fit_song_id(self, results, song):
titleSplit = title.split('-')
if len(titleSplit) == 2:
title = titleSplit[1]
artists = res['artist']
else:
artists = ' '.join([a['name'] for a in res['artists']])

artists = ' '.join([a['name'] for a in res['artists']])

title_score[res['videoId']] = difflib.SequenceMatcher(a=title.lower(), b=song['name'].lower()).ratio()
scores = [durationMatch * 5, title_score[res['videoId']],
Expand Down
2 changes: 1 addition & 1 deletion requirements
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
gmusicapi
ytmusicapi>=0.7
ytmusicapi>=0.12.2
spotipy

0 comments on commit 91a8baa

Please sign in to comment.