fix(manifests): clean stale .!dev resume markers before merge

HLS/DASH/ISM iterdir included leftover .!dev control files from aborted runs, crashing HLS merge_discontinuity and silently corrupting DASH/ISM merged output.
This commit is contained in:
imSp4rky
2026-05-04 22:51:45 -06:00
parent db313a8ee2
commit 08c0862691
4 changed files with 8 additions and 6 deletions
+3
View File
@@ -489,6 +489,9 @@ class DASH:
)
raise FileNotFoundError(error_msg)
for control_file in save_dir.glob("*.!dev"):
control_file.unlink(missing_ok=True)
segments_to_merge = [x for x in sorted(save_dir.iterdir()) if x.is_file()]
if debug_logger:
+2 -3
View File
@@ -655,9 +655,8 @@ class HLS:
status_update["downloaded"] = f"HLS {downloaded}"
progress(**status_update)
# see https://github.com/devine-dl/devine/issues/71
for control_file in segment_save_dir.glob("*.aria2__temp"):
control_file.unlink()
for control_file in segment_save_dir.glob("*.!dev"):
control_file.unlink(missing_ok=True)
progress(total=total_segments, completed=0, downloaded="Merging")
+3
View File
@@ -325,6 +325,9 @@ class ISM:
)
raise FileNotFoundError(error_msg)
for control_file in save_dir.glob("*.!dev"):
control_file.unlink(missing_ok=True)
segments_to_merge = [x for x in sorted(save_dir.iterdir()) if x.is_file()]
if debug_logger:
-3
View File
@@ -358,9 +358,6 @@ class Track:
status_update["downloaded"] = f"URL {downloaded}"
progress(**status_update)
# see https://github.com/devine-dl/devine/issues/71
save_path.with_suffix(f"{save_path.suffix}.aria2__temp").unlink(missing_ok=True)
self.path = save_path
events.emit(events.Types.TRACK_DOWNLOADED, track=self)