]> git.bitcoin.ninja Git - youtube-dl/commitdiff
warn if %(stitle)s is being used
authorPhilipp Hagemeister <phihag@phihag.de>
Tue, 27 Nov 2012 12:11:06 +0000 (13:11 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Tue, 27 Nov 2012 12:11:06 +0000 (13:11 +0100)
youtube_dl/FileDownloader.py
youtube_dl/__init__.py

index dce1a23a4c1d470a2e0cc971519386faa06aea73..b6aebe4ac24f5dfcbdaf044730365b833eeab091 100644 (file)
@@ -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:
index c3e0f78e5f12bb1176a0f1105096e776391a1fff..7cc17af9309165032074284dca87a88c8ad5a11c 100644 (file)
@@ -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: