Update subtitle.py

This commit is contained in:
Parasitic5283 2024-10-15 11:24:13 +02:00 committed by GitHub
parent 00f974b3fa
commit c8befec3f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -275,12 +275,12 @@ class Subtitle(Track):
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL
)
elif self.codec in Subtitle.Codec.fTTML:
output_path = self.path.with_suffix(".srt")
converter = ISMTConverter()
srt = converter.from_file(self.path)
srt.save(output_path)
codec = Subtitle.Codec.SubRip
elif self.codec in Subtitle.Codec.fTTML:
output_path = self.path.with_suffix(".srt")
converter = ISMTConverter()
srt = converter.from_file(self.path)
srt.save(output_path)
codec = Subtitle.Codec.SubRip
else:
writer = {
# pycaption generally only supports these subtitle formats