animetosho2mks: Work with older format

An older format has no language flag for subtitles.
This commit is contained in:
Simon Bruder 2020-03-07 19:32:31 +00:00
parent 87ff30582f
commit 83e88d682b
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F

View file

@ -13,7 +13,11 @@ class SubtitleTrack:
def _parse_filename(self):
basename = self.filename.split(".")[0]
language = basename.split("_")[1]
try:
language = basename.split("_")[1]
except IndexError:
# older format
language = "eng"
return language