mirror of
https://github.com/morpheus65535/bazarr
synced 2025-03-11 06:32:52 +00:00
Fixed animetosho provider empty subtitle name. #2468
This commit is contained in:
parent
fd190aad14
commit
5e0433834e
1 changed files with 3 additions and 2 deletions
|
@ -141,8 +141,9 @@ class AnimeToshoProvider(Provider, ProviderSubtitleArchiveMixin):
|
|||
lang = Language.fromalpha3b(subtitle_file['info']['lang'])
|
||||
|
||||
# For Portuguese and Portuguese Brazilian they both share the same code, the name is the only
|
||||
# identifier AnimeTosho provides.
|
||||
if lang.alpha3 == 'por' and subtitle_file['info']['name'].lower().find('brazil'):
|
||||
# identifier AnimeTosho provides. Also, some subtitles does not have name, in this case it could
|
||||
# be a false negative but there is nothing we can use to guarantee it is PT-BR, we rather skip it.
|
||||
if lang.alpha3 == 'por' and subtitle_file['info'].get('name', '').lower().find('brazil'):
|
||||
lang = Language('por', 'BR')
|
||||
|
||||
subtitle = self.subtitle_class(
|
||||
|
|
Loading…
Add table
Reference in a new issue