Fix segment download merging on Linux machines

It seems on Windows the pathlib.iterdir() function is always in order. However, on Linux or at least some machines this is not the case. This change fixes the order.

If you think you were affected, check your previous downloads that used DASH or HLS segmentation and make sure they dont randomly change scenes out of order.
This commit is contained in:
rlaphoenix 2023-02-24 23:10:51 +00:00
parent c6976a7112
commit eebe76b6f6
1 changed files with 1 additions and 1 deletions

View File

@ -648,7 +648,7 @@ class dl:
track.OnDecrypted(track)
else:
with open(save_path, "wb") as f:
for file in save_dir.iterdir():
for file in sorted(save_dir.iterdir()):
f.write(file.read_bytes())
file.unlink()
save_dir.rmdir()