Fix animetosho encoding parser

This commit is contained in:
Anderson Oki 2024-04-27 13:59:14 +09:00
parent 86b889d3b6
commit 20b1f75729
1 changed files with 2 additions and 1 deletions

View File

@ -201,7 +201,8 @@ class SubstationFormat(FormatBase):
elif f in {"bold", "underline", "italic", "strikeout"}:
return v == "-1"
elif f in {"borderstyle", "encoding", "marginl", "marginr", "marginv", "layer", "alphalevel"}:
return int(v)
# There are subtitle cases where layer could be empty which represents the single 0 layer.
return int(v) if v != "" else 0
elif f in {"fontsize", "scalex", "scaley", "spacing", "angle", "outline", "shadow"}:
return float(v)
elif f == "marked":