From 6fa3554b70a9b99d0b9240c059785dc72d4956b6 Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 27 Nov 2025 23:03:53 +0000 Subject: [PATCH] fix(dl): preserve attachments when rebuilding track list Attachments (screenshots, fonts) were being dropped when title.tracks was rebuilt from kept_tracks, causing image files to remain in temp directory after muxing. The cleanup code iterated over an empty attachments list since they were orphaned during track filtering. --- unshackle/commands/dl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unshackle/commands/dl.py b/unshackle/commands/dl.py index 5a38b20..8c8e68f 100644 --- a/unshackle/commands/dl.py +++ b/unshackle/commands/dl.py @@ -1368,6 +1368,8 @@ class dl: kept_tracks.extend(title.tracks.subtitles) if keep_chapters: kept_tracks.extend(title.tracks.chapters) + # Always preserve attachments (screenshots, fonts, etc.) for cleanup + kept_tracks.extend(title.tracks.attachments) title.tracks = Tracks(kept_tracks)