From: Philipp Hagemeister Date: Thu, 11 Apr 2013 15:07:55 +0000 (+0200) Subject: Fix default for variable-size autonumbering X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=e0fee250c30969b73685bbf9d3e6ad0d7917a0a6;p=youtube-dl Fix default for variable-size autonumbering --- diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py index 7731db17f..d4f9cc621 100644 --- a/youtube_dl/FileDownloader.py +++ b/youtube_dl/FileDownloader.py @@ -388,7 +388,9 @@ class FileDownloader(object): template_dict = dict(info_dict) template_dict['epoch'] = int(time.time()) - autonumber_size = self.params.get('autonumber_size', 5) + autonumber_size = self.params.get('autonumber_size') + if autonumber_size is None: + autonumber_size = 5 autonumber_templ = u'%0' + str(autonumber_size) + u'd' template_dict['autonumber'] = autonumber_templ % self._num_downloads