diff --git a/devine/core/manifests/dash.py b/devine/core/manifests/dash.py index 93dde88..425292f 100644 --- a/devine/core/manifests/dash.py +++ b/devine/core/manifests/dash.py @@ -483,6 +483,7 @@ class DASH: segment_data = try_ensure_utf8(segment_data) segment_data = html.unescape(segment_data.decode("utf8")).encode("utf8") f.write(segment_data) + f.flush() segment_file.unlink() progress(advance=1) diff --git a/devine/core/manifests/hls.py b/devine/core/manifests/hls.py index 580f924..d80d4a1 100644 --- a/devine/core/manifests/hls.py +++ b/devine/core/manifests/hls.py @@ -310,6 +310,7 @@ class HLS: x.write(map_data[1]) for file in via: x.write(file.read_bytes()) + x.flush() if delete: file.unlink() @@ -485,6 +486,7 @@ class HLS: continue discontinuity_data = discontinuity_file.read_bytes() f.write(discontinuity_data) + f.flush() shutil.rmtree(save_dir) progress(downloaded="Downloaded")