aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-11-25 22:15:20 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-11-25 22:15:33 +0100
commit0c75c3fa7a24c05a74891ec49e5a18de4f2792f1 (patch)
tree6cc1ead57d6a3d23de717e0ec2be6289068b88b4 /youtube_dl/YoutubeDL.py
parent2a15e7063bceed326bcbc0a01ba77324f0373a0c (diff)
Do not warn about fixed output template if --max-downloads is 1
Fixes #1828
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rw-r--r--youtube_dl/YoutubeDL.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index 0cef1daf3..50f750593 100644
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -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: