mirror of https://github.com/devine-dl/devine.git
Don't absorb error messages on Caption Syntax Errors
This commit is contained in:
parent
2a4dfb3e93
commit
41018d4574
|
@ -178,8 +178,8 @@ class Subtitle(Track):
|
|||
replace("\n\n<", "\n<")
|
||||
captions: pycaption.CaptionSet = pycaption.WebVTTReader().read(text)
|
||||
return captions
|
||||
except pycaption.exceptions.CaptionReadSyntaxError:
|
||||
raise SyntaxError(f"A syntax error has occurred when reading the \"{codec}\" subtitle")
|
||||
except pycaption.exceptions.CaptionReadSyntaxError as e:
|
||||
raise SyntaxError(f"A syntax error has occurred when reading the \"{codec}\" subtitle: {e}")
|
||||
except pycaption.exceptions.CaptionReadNoCaptions:
|
||||
return pycaption.CaptionSet({"en": []})
|
||||
|
||||
|
|
Loading…
Reference in New Issue