diff options
author | vitiko98 <[email protected]> | 2022-09-02 22:09:02 -0400 |
---|---|---|
committer | vitiko98 <[email protected]> | 2022-09-02 23:37:17 -0400 |
commit | 0bc05232ed69be8dd727ce70e24e68e9d7362367 (patch) | |
tree | 3b58238f2dd461310c8c5a8edfc697a0e317ea0d | |
parent | 93612434e59a99f858a33667fae8835bb3473c53 (diff) | |
download | bazarr-0bc05232ed69be8dd727ce70e24e68e9d7362367.tar.gz bazarr-0bc05232ed69be8dd727ce70e24e68e9d7362367.zip |
Ignore mods for non-tested subtitle formats
-rw-r--r-- | libs/subliminal_patch/subtitle.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/subliminal_patch/subtitle.py b/libs/subliminal_patch/subtitle.py index ab54626cd..1cbc55845 100644 --- a/libs/subliminal_patch/subtitle.py +++ b/libs/subliminal_patch/subtitle.py @@ -388,6 +388,12 @@ class Subtitle(Subtitle_): """ :return: string """ + # ASS and other formats are not tested and are likely to break the application. + # We will ignore them for now. + if self.format != "srt": + logger.debug("'%s' format does not support mods", self.format) + return self.content + if not self.mods: return fix_text(self.content.decode(encoding=self.get_encoding()), **ftfy_defaults).encode( encoding=self.get_encoding()) |