aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/FileDownloader.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-04-11 17:07:55 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-04-11 17:07:55 +0200
commite0fee250c30969b73685bbf9d3e6ad0d7917a0a6 (patch)
treebb7e417d760f4ce70216ed94a74bec17a35a8b42 /youtube_dl/FileDownloader.py
parent72ca05016dbeae805826a9245e31c0652239405e (diff)
Fix default for variable-size autonumbering
Diffstat (limited to 'youtube_dl/FileDownloader.py')
-rw-r--r--youtube_dl/FileDownloader.py4
1 files changed, 3 insertions, 1 deletions
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