Fix get_playlist_items for empty playlist
This commit is contained in:
parent
9ef92f866c
commit
49c4821813
1 changed files with 3 additions and 0 deletions
|
|
@ -244,6 +244,9 @@ class YTMusic:
|
|||
else:
|
||||
header = response['header']['musicEditablePlaylistDetailHeaderRenderer']['header']['musicDetailHeaderRenderer']
|
||||
song_count = int(header['secondSubtitle']['runs'][0]['text'].split(' ')[0])
|
||||
if song_count == 0:
|
||||
return songs
|
||||
|
||||
songs_to_get = min(limit, song_count)
|
||||
songs.extend(parse_songs(results['contents']))
|
||||
request_count = 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue