Skip to content

Commit

Permalink
ignore videos without title (closes #58)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed May 29, 2023
1 parent efd2ae3 commit e1b6f64
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spotify_to_ytmusic/match.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ def get_best_fit_song_id(ytm_results, spoti) -> str:
match_score = {}
title_score = {}
for ytm in ytm_results:
if "resultType" not in ytm or ytm["resultType"] not in ["song", "video"]:
if (
"resultType" not in ytm
or ytm["resultType"] not in ["song", "video"]
or not ytm["title"]
):
continue

duration_match_score = None
Expand Down

0 comments on commit e1b6f64

Please sign in to comment.