]> git.bitcoin.ninja Git - youtube-dl/commitdiff
Merge remote-tracking branch 'origin/master' into IE_cleanup
authorFilippo Valsorda <filippo.valsorda@gmail.com>
Tue, 27 Nov 2012 22:20:32 +0000 (23:20 +0100)
committerFilippo Valsorda <filippo.valsorda@gmail.com>
Tue, 27 Nov 2012 22:20:32 +0000 (23:20 +0100)
Conflicts:
youtube_dl/FileDownloader.py

1  2 
youtube_dl/FileDownloader.py
youtube_dl/InfoExtractors.py

index a7997c4f2d26d8edddab0cb6360e06a033c95767,4e9b55f49268fbf22bf5c6057ee13de94b663007..870c8227235c5a423768be8b13e92f7cb9cb2a7c
@@@ -325,9 -327,10 +327,13 @@@ class FileDownloader(object)
                """Generate the output filename."""
                try:
                        template_dict = dict(info_dict)
-                       template_dict['epoch'] = unicode(int(time.time()))
-                       template_dict['autonumber'] = unicode('%05d' % self._num_downloads)
++
+                       template_dict['epoch'] = int(time.time())
+                       template_dict['autonumber'] = u'%05d' % self._num_downloads
 +                      template_dict = dict((key, u'NA' if val is None else val) for key, val in template_dict.items())
+                       template_dict = dict((k, sanitize_filename(u(v), self.params.get('restrictfilenames'))) for k,v in template_dict.items())
++
                        filename = self.params['outtmpl'] % template_dict
                        return filename
                except (ValueError, KeyError), err:
Simple merge