Do not warn about fixed output template if --max-downloads is 1

Fixes #1828
This commit is contained in:
Philipp Hagemeister 2013-11-25 22:15:20 +01:00
parent 2a15e7063b
commit 0c75c3fa7a
2 changed files with 6 additions and 6 deletions

View file

@ -258,10 +258,6 @@ class YoutubeDL(object):
if self.params.get('cookiefile') is not None:
self.cookiejar.save()
def fixed_template(self):
"""Checks if the output template is fixed."""
return (re.search(u'(?u)%\\(.+?\\)s', self.params['outtmpl']) is None)
def trouble(self, message=None, tb=None):
"""Determine action to take when a download problem appears.
@ -798,7 +794,9 @@ class YoutubeDL(object):
def download(self, url_list):
"""Download a given list of URLs."""
if len(url_list) > 1 and self.fixed_template():
if (len(url_list) > 1 and
'%' not in self.params['outtmpl']
and self.params.get('max_downloads') != 1):
raise SameFileError(self.params['outtmpl'])
for url in url_list: