mirror of
https://zotify.xyz/zotify/zotify.git
synced 2024-11-10 01:02:06 +01:00
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.
This commit is contained in:
parent
5da27d32a1
commit
5e2e51ea9d
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue