Fix: del playlist_items parameter only when set
This code sometimes had raised KeyError
This commit is contained in:
parent
5444969027
commit
45e5bcee27
1 changed files with 3 additions and 1 deletions
|
@ -155,7 +155,9 @@ class Downloader:
|
|||
ydl.params['playlist_items'] = ','.join(str(i) for i in playlist_items)
|
||||
|
||||
ret = ydl.download(url)
|
||||
del ydl.params['playlist_items']
|
||||
|
||||
if playlist_items:
|
||||
del ydl.params['playlist_items']
|
||||
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Reference in a new issue