From: Philipp Hagemeister Date: Tue, 27 Nov 2012 12:11:06 +0000 (+0100) Subject: warn if %(stitle)s is being used X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=97cd3afc7525394c46398f1526d412d081c02085;p=youtube-dl warn if %(stitle)s is being used --- diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py index dce1a23a4..b6aebe4ac 100644 --- a/youtube_dl/FileDownloader.py +++ b/youtube_dl/FileDownloader.py @@ -94,6 +94,9 @@ class FileDownloader(object): self._screen_file = [sys.stdout, sys.stderr][params.get('logtostderr', False)] self.params = params + if '%(stitle)s' in self.params['outtmpl']: + self.to_stderr(u'WARNING: %(stitle)s is deprecated. Use the %(title)s and the --restrict-filenames flag(which also secures %(uploader)s et al) instead.') + @staticmethod def format_bytes(bytes): if bytes is None: diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index c3e0f78e5..7cc17af93 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -532,7 +532,7 @@ def _real_main(): parser.error(u'you must provide at least one URL') else: sys.exit() - + try: retcode = fd.download(all_urls) except MaxDownloadsReached: