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:
Nasy 2019-01-08 21:34:15 +08:00 committed by GitHub
parent 2543938bbe
commit 2b2e2c5516
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1989,8 +1989,7 @@ class YoutubeDL(object):
def download(self, url_list):
"""Download a given list of URLs."""
outtmpl = self.params.get('outtmpl', DEFAULT_OUTTMPL)
if (len(url_list) > 1 and
outtmpl != '-' and
if (outtmpl != '-' and
'%' not in outtmpl and
self.params.get('max_downloads') != 1):
raise SameFileError(outtmpl)