From 18b05340202d2d589fb7abe6657e2496b40eaeef Mon Sep 17 00:00:00 2001 From: Andy Date: Fri, 16 Jan 2026 13:42:11 +0000 Subject: [PATCH] fix(subs): strip whitespace from ASS font names Use removeprefix instead of removesuffix and add strip() to handle ASS subtitle files that have spaces after commas in Style definitions. Fixes #57 --- unshackle/commands/dl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unshackle/commands/dl.py b/unshackle/commands/dl.py index cfd09ec..71549a3 100644 --- a/unshackle/commands/dl.py +++ b/unshackle/commands/dl.py @@ -1567,7 +1567,7 @@ class dl: if subtitle.codec == Subtitle.Codec.SubStationAlphav4: for line in subtitle.path.read_text("utf8").splitlines(): if line.startswith("Style: "): - font_names.append(line.removesuffix("Style: ").split(",")[1]) + font_names.append(line.removeprefix("Style: ").split(",")[1].strip()) font_count, missing_fonts = self.attach_subtitle_fonts( font_names, title, temp_font_files