From a7bce6ee33bc7058cf91d0b50df1cff0a83992c9 Mon Sep 17 00:00:00 2001 From: PhYrE Date: Wed, 24 Apr 2024 01:31:04 +0200 Subject: [PATCH] revert 5e2e51ea9df759c0689d1961119460aea1ba7980 revert Don't crash out if a user includes an episode/podcast in a playlist. Previously, "'NoneType' object is not subscriptable" happened on certain playlists where the playlist includes a podcast episode or other non-track content. This checks it and skips over in such a case. --- zotify/playlist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zotify/playlist.py b/zotify/playlist.py index 919c47b..53c1941 100644 --- a/zotify/playlist.py +++ b/zotify/playlist.py @@ -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] is not None and song[TRACK][ID]] + playlist_songs = [song for song in get_playlist_songs(playlist[ID]) if 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: