1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 17:22:31 +01:00

Fix default for variable-size autonumbering

This commit is contained in:
Philipp Hagemeister 2013-04-11 17:07:55 +02:00
parent 72ca05016d
commit e0fee250c3

View File

@ -388,7 +388,9 @@ def prepare_filename(self, info_dict):
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