From cf537891f7cc2a3414ed6b726cfb619a462a845b Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 26 Jan 2026 10:13:03 -0700 Subject: [PATCH] fix(subs): route pycaption-unsupported formats to pysubs2 in auto mode --- unshackle/core/tracks/subtitle.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/unshackle/core/tracks/subtitle.py b/unshackle/core/tracks/subtitle.py index d9db869..929e6bf 100644 --- a/unshackle/core/tracks/subtitle.py +++ b/unshackle/core/tracks/subtitle.py @@ -713,7 +713,8 @@ class Subtitle(Track): Convert this Subtitle to another Format. The conversion method is determined by the 'conversion_method' setting in config: - - 'auto' (default): Uses subby for WebVTT/SAMI, standard for others + - 'auto' (default): Uses subby for WebVTT/fVTT/SAMI; for SSA/ASS/MicroDVD/MPL2/TMP + uses SubtitleEdit if available, otherwise pysubs2; standard for others - 'subby': Always uses subby with CommonIssuesFixer - 'subtitleedit': Uses SubtitleEdit when available, falls back to pycaption - 'pycaption': Uses only pycaption library @@ -733,6 +734,17 @@ class Subtitle(Track): elif conversion_method == "auto": if self.codec in (Subtitle.Codec.WebVTT, Subtitle.Codec.fVTT, Subtitle.Codec.SAMI): return self.convert_with_subby(codec) + elif self.codec in ( + Subtitle.Codec.SubStationAlpha, + Subtitle.Codec.SubStationAlphav4, + Subtitle.Codec.MicroDVD, + Subtitle.Codec.MPL2, + Subtitle.Codec.TMP, + ): + if binaries.SubtitleEdit: + return self._convert_standard(codec) + else: + return self.convert_with_pysubs2(codec) else: return self._convert_standard(codec) else: