Skip to content

Commit

Permalink
Fixed the tool not creating a new playlist when the provided playlist…
Browse files Browse the repository at this point in the history
… name does not already exist

updated the check to create a new playlist. get_playlist_id_by_name appears to return None, not the empty string, when the named playlist is not found
  • Loading branch information
minheed-s authored May 5, 2024
1 parent 5496cb6 commit 4e87dfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spotify2ytmusic/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def copy_playlist(
ytmusic_playlist_id = get_playlist_id_by_name(yt, pl_name)
print(f"Looking up playlist '{pl_name}': id={ytmusic_playlist_id}")

if ytmusic_playlist_id == "":
if ytmusic_playlist_id is None:
if pl_name == "":
print("No playlist name or ID provided, creating playlist...")
spotify_pls: dict = load_playlists_json()
Expand Down

0 comments on commit 4e87dfc

Please sign in to comment.