1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-04 00:55:15 +00:00

[cleanup] Minor cleanup

This commit is contained in:
pukkandan
2021-11-04 03:40:35 +05:30
parent 8913ef74d7
commit a4211baff5
9 changed files with 24 additions and 22 deletions

View File

@ -319,7 +319,9 @@ class FileDownloader(object):
msg_template = '%(_downloaded_bytes_str)s at %(_speed_str)s'
else:
msg_template = '%(_percent_str)s % at %(_speed_str)s ETA %(_eta_str)s'
if s.get('fragment_index'):
if s.get('fragment_index') and s.get('fragment_count'):
msg_template += ' (frag %(fragment_index)s/%(fragment_count)s)'
elif s.get('fragment_index'):
msg_template += ' (frag %(fragment_index)s)'
s['_default_template'] = msg_template % s
self._report_progress_status(s)