Merge pull request 'Don't crash out if a user includes an episode/podcast in a playlist.' (#17) from PhYrE/zotify:episode-fix into main

Reviewed-on: https://zotify.xyz/zotify/zotify/pulls/17
This commit is contained in:
Zotify 2024-06-01 04:03:00 +02:00
commit a32ba7a05b

View file

@ -49,7 +49,7 @@ def get_playlist_info(playlist_id):
def download_playlist(playlist):
"""Downloads all the songs from a playlist"""
playlist_songs = [song for song in get_playlist_songs(playlist[ID]) if song[TRACK][ID]]
playlist_songs = [song for song in get_playlist_songs(playlist[ID]) if song[TRACK] is not None and song[TRACK][ID]]
p_bar = Printer.progress(playlist_songs, unit='song', total=len(playlist_songs), unit_scale=True)
enum = 1
for song in p_bar: