fdf
This commit is contained in:
@@ -532,6 +532,13 @@ class ProgressBar:
|
||||
Formatted progress string.
|
||||
"""
|
||||
percent = self.format_percent(percent_str)
|
||||
# Some callers (e.g. yt-dlp hooks) may not provide a stable percent string.
|
||||
# When we have byte counts, derive percent from them so the bar advances.
|
||||
if (not percent_str or percent == 0.0) and downloaded is not None and total is not None and total > 0:
|
||||
try:
|
||||
percent = (float(downloaded) / float(total)) * 100.0
|
||||
except Exception:
|
||||
percent = percent
|
||||
bar = self.build_bar(percent)
|
||||
|
||||
# Format sizes
|
||||
|
||||
Reference in New Issue
Block a user