Remove useless len(url_list) > 1
in YoutubeDL.py
Remove useless `len(url_list) > 1` in YoutubeDL.py so that `download` function can support not only list but also iterable object.
This commit is contained in:
parent
2543938bbe
commit
2b2e2c5516
@ -1989,8 +1989,7 @@ class YoutubeDL(object):
|
|||||||
def download(self, url_list):
|
def download(self, url_list):
|
||||||
"""Download a given list of URLs."""
|
"""Download a given list of URLs."""
|
||||||
outtmpl = self.params.get('outtmpl', DEFAULT_OUTTMPL)
|
outtmpl = self.params.get('outtmpl', DEFAULT_OUTTMPL)
|
||||||
if (len(url_list) > 1 and
|
if (outtmpl != '-' and
|
||||||
outtmpl != '-' and
|
|
||||||
'%' not in outtmpl and
|
'%' not in outtmpl and
|
||||||
self.params.get('max_downloads') != 1):
|
self.params.get('max_downloads') != 1):
|
||||||
raise SameFileError(outtmpl)
|
raise SameFileError(outtmpl)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user