diff --git a/buganime/buganime.py b/buganime/buganime.py index 32a1178..ba3510d 100644 --- a/buganime/buganime.py +++ b/buganime/buganime.py @@ -71,7 +71,7 @@ def _get_subtitle_stream_index() -> int: relevant_streams = [] for i, stream in enumerate(subtitle_streams): match stream: - case {'tags': {'language': str(lang)}} if lang in ('en', 'eng'): + case {'tags': {'language': str() as lang}} if lang in ('en', 'eng'): if all(x not in stream['tags'].get('title', '').upper() for x in ('S&S', 'SIGNS', 'FORCED')) and \ stream['codec_name'].lower() in SUPPORTED_SUBTITLE_CODECS: relevant_streams.append((i, stream)) diff --git a/tests/test_buganime.py b/tests/test_buganime.py index a599c29..9353d8a 100644 --- a/tests/test_buganime.py +++ b/tests/test_buganime.py @@ -84,6 +84,9 @@ (r'C:\Tohai.-.Ura.Rate.Mahjong.Tohai.Roku.S01E01.1080p.AMZN.WEB-DL.DDP2.0.H.264-Emmid' r'\Tohai.-.Ura.Rate.Mahjong.Tohai.Roku.S01E01.1080p.AMZN.WEB-DL.DDP2.0.H.264-Emmid.mkv', buganime.TVShow(name='Tohai Ura Rate Mahjong Tohai Roku', season=1, episode=1)), + + (r'C:\Temp\Torrents\Elegy.for.the.Henchmen.Fist.of.the.North.Star.S01E01.1080p.AMZN.WEB-DL.JPN.DDP2.0.H.264.ESub-ToonsHub.mkv', + buganime.TVShow(name='Elegy for the Henchmen Fist of the North Star', season=1, episode=1)), ]