Fix: del playlist_items parameter only when set

This code sometimes had raised KeyError
This commit is contained in:
DarkCat09 2024-05-08 13:54:56 +04:00
parent 5444969027
commit 45e5bcee27
Signed by: DarkCat09
GPG key ID: 0A26CD5B3345D6E3

View file

@ -155,6 +155,8 @@ class Downloader:
ydl.params['playlist_items'] = ','.join(str(i) for i in playlist_items) ydl.params['playlist_items'] = ','.join(str(i) for i in playlist_items)
ret = ydl.download(url) ret = ydl.download(url)
if playlist_items:
del ydl.params['playlist_items'] del ydl.params['playlist_items']
return ret return ret