mirror of https://github.com/morpheus65535/bazarr
Compare commits
3 Commits
fd190aad14
...
86b889d3b6
Author | SHA1 | Date |
---|---|---|
Anderson Shindy Oki | 86b889d3b6 | |
Anderson Shindy Oki | 0bdfcd0eda | |
Anderson Shindy Oki | 5e0433834e |
|
@ -53,7 +53,7 @@ class AniDBClient(object):
|
||||||
]
|
]
|
||||||
|
|
||||||
if not animes:
|
if not animes:
|
||||||
return None
|
return None, None
|
||||||
|
|
||||||
# Sort the anime by offset in ascending order
|
# Sort the anime by offset in ascending order
|
||||||
animes.sort(key=lambda a: a.episode_offset)
|
animes.sort(key=lambda a: a.episode_offset)
|
||||||
|
|
|
@ -141,8 +141,9 @@ class AnimeToshoProvider(Provider, ProviderSubtitleArchiveMixin):
|
||||||
lang = Language.fromalpha3b(subtitle_file['info']['lang'])
|
lang = Language.fromalpha3b(subtitle_file['info']['lang'])
|
||||||
|
|
||||||
# For Portuguese and Portuguese Brazilian they both share the same code, the name is the only
|
# For Portuguese and Portuguese Brazilian they both share the same code, the name is the only
|
||||||
# identifier AnimeTosho provides.
|
# identifier AnimeTosho provides. Also, some subtitles does not have name, in this case it could
|
||||||
if lang.alpha3 == 'por' and subtitle_file['info']['name'].lower().find('brazil'):
|
# 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')
|
lang = Language('por', 'BR')
|
||||||
|
|
||||||
subtitle = self.subtitle_class(
|
subtitle = self.subtitle_class(
|
||||||
|
|
|
@ -82,7 +82,12 @@ const ProfileEditForm: FunctionComponent<Props> = ({
|
||||||
|
|
||||||
const itemCutoffOptions = useSelectorOptions(
|
const itemCutoffOptions = useSelectorOptions(
|
||||||
form.values.items,
|
form.values.items,
|
||||||
(v) => v.language,
|
(v) => {
|
||||||
|
const suffix =
|
||||||
|
v.hi === "True" ? ":hi" : v.forced === "True" ? ":forced" : "";
|
||||||
|
|
||||||
|
return v.language + suffix;
|
||||||
|
},
|
||||||
(v) => String(v.id),
|
(v) => String(v.id),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue