HLS: Ignore possible folders when doing naive final merge

This commit is contained in:
rlaphoenix 2024-02-16 18:41:05 +00:00
parent 323577a5fd
commit 9e0515609f
1 changed files with 3 additions and 2 deletions

View File

@ -481,10 +481,11 @@ class HLS:
else:
with open(save_path, "wb") as f:
for discontinuity_file in sorted(save_dir.iterdir()):
if discontinuity_file.is_dir():
continue
discontinuity_data = discontinuity_file.read_bytes()
f.write(discontinuity_data)
discontinuity_file.unlink()
save_dir.rmdir()
shutil.rmtree(save_dir)
progress(downloaded="Downloaded")