Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buganime/buganime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 3 additions & 0 deletions tests/test_buganime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
]


Expand Down