mirror of https://github.com/devine-dl/devine.git
Update subtitle.py
This commit is contained in:
parent
00f974b3fa
commit
c8befec3f3
|
@ -275,12 +275,12 @@ class Subtitle(Track):
|
||||||
stdout=subprocess.DEVNULL,
|
stdout=subprocess.DEVNULL,
|
||||||
stderr=subprocess.DEVNULL
|
stderr=subprocess.DEVNULL
|
||||||
)
|
)
|
||||||
elif self.codec in Subtitle.Codec.fTTML:
|
elif self.codec in Subtitle.Codec.fTTML:
|
||||||
output_path = self.path.with_suffix(".srt")
|
output_path = self.path.with_suffix(".srt")
|
||||||
converter = ISMTConverter()
|
converter = ISMTConverter()
|
||||||
srt = converter.from_file(self.path)
|
srt = converter.from_file(self.path)
|
||||||
srt.save(output_path)
|
srt.save(output_path)
|
||||||
codec = Subtitle.Codec.SubRip
|
codec = Subtitle.Codec.SubRip
|
||||||
else:
|
else:
|
||||||
writer = {
|
writer = {
|
||||||
# pycaption generally only supports these subtitle formats
|
# pycaption generally only supports these subtitle formats
|
||||||
|
|
Loading…
Reference in New Issue