A feature-rich command-line audio/video downloader
Check the output name is not fixed when there are several videos to download
Ricardo Garciab46347267a8c
diff --git a/youtube-dl b/youtube-dlindex 45773fda24..dfbdc4a478 100755--- a/youtube-dl+++ b/youtube-dl@@ -38,7 +38,7 @@ class FileDownloader(object):For this, file downloader objects have a method that allowsInfoExtractors to be registered in a given order. When it is passeda URL, the file downloader handles it to the first InfoExtractor it- finds that reports it's able to handle it. The InfoExtractor returns+ finds that reports being able to handle it. The InfoExtractor returnsall the information to the FileDownloader and the latter downloads thefile or does whatever it's instructed to do.@@ -153,9 +153,12 @@ class FileDownloader(object):continue# Suitable InfoExtractor foundsuitable_found = True- for result in ie.extract(url):- if result is None:- continue+ results = [x for x in ie.extract(url) if x is not None]++ if (len(url_list) > 1 or len(results) > 1) and re.search(r'%\(.+?\)s', self._params['outtmpl']) is None:+ sys.exit('ERROR: fixed output name but more than one file to download')++ for result in results:try:filename = self._params['outtmpl'] % resultexcept (KeyError), err: