From e7b716d79c662143755e9173ed5c361818819ad6 Mon Sep 17 00:00:00 2001 From: imSp4rky Date: Sat, 11 Jul 2026 10:51:39 -0600 Subject: [PATCH] fix(dl): restore real progress bars where progression is trackable --- unshackle/commands/dl.py | 3 +-- unshackle/core/manifests/dash.py | 2 +- unshackle/core/manifests/hls.py | 2 +- unshackle/core/manifests/ism.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/unshackle/commands/dl.py b/unshackle/commands/dl.py index 75908004..41ff774b 100644 --- a/unshackle/commands/dl.py +++ b/unshackle/commands/dl.py @@ -3262,6 +3262,7 @@ class dl: with SyncLive(Padding(progress, (0, 5, 1, 5)), console=console, refresh_per_second=20): mux_index = 0 for task_id, task_tracks, audio_codec in multiplex_tasks: + progress.start_task(task_id) audio_expected = not video_only and not no_audio muxed_path, return_code, errors = task_tracks.mux( str(title), @@ -3271,8 +3272,6 @@ class dl: title_language=title.language, skip_subtitles=skip_subtitle_mux, ) - progress.start_task(task_id) - progress.update(task_id, total=100, completed=100) if muxed_path.exists(): mux_index += 1 unique_path = muxed_path.with_name( diff --git a/unshackle/core/manifests/dash.py b/unshackle/core/manifests/dash.py index 66f28374..3aeee536 100644 --- a/unshackle/core/manifests/dash.py +++ b/unshackle/core/manifests/dash.py @@ -547,7 +547,7 @@ class DASH: if init_data: f.write(init_data) if len(segments_to_merge) > 1: - progress(downloaded="Merging", completed=0, total=None) + progress(downloaded="Merging", completed=0, total=len(segments_to_merge)) for segment_file in segments_to_merge: if is_text_subtitle: segment_data = try_ensure_utf8(segment_file.read_bytes()) diff --git a/unshackle/core/manifests/hls.py b/unshackle/core/manifests/hls.py index 91933a48..74428f07 100644 --- a/unshackle/core/manifests/hls.py +++ b/unshackle/core/manifests/hls.py @@ -701,7 +701,7 @@ class HLS: for control_file in segment_save_dir.glob("*.!dev"): control_file.unlink(missing_ok=True) - progress(downloaded="Merging", completed=0, total=None) + progress(total=total_segments, completed=0, downloaded="Merging") name_len = len(str(total_segments)) discon_i = 0 diff --git a/unshackle/core/manifests/ism.py b/unshackle/core/manifests/ism.py index 21b98222..e38b17b9 100644 --- a/unshackle/core/manifests/ism.py +++ b/unshackle/core/manifests/ism.py @@ -497,7 +497,7 @@ class ISM: and isinstance(track, Subtitle) and track.codec not in (Subtitle.Codec.fVTT, Subtitle.Codec.fTTML) ) - progress(downloaded="Merging", completed=0, total=None) + progress(downloaded="Merging", completed=0, total=len(segments_to_merge)) with open(save_path, "wb") as f: first_segment = segments_to_merge[0].read_bytes() if segments_to_merge else None init_segment = ISM._init_segment(track, session_drm, first_segment)