Compare commits

...

3 Commits

Author SHA1 Message Date
Anderson Shindy Oki 86b889d3b6
Improved cutoff options label. #2466 2024-04-24 22:34:42 -04:00
Anderson Shindy Oki 0bdfcd0eda
no log: Fix anidb enrichment return type (#2472) 2024-04-24 20:57:39 -04:00
Anderson Shindy Oki 5e0433834e
Fixed animetosho provider empty subtitle name. #2468 2024-04-24 20:27:04 -04:00
3 changed files with 10 additions and 4 deletions

View File

@ -53,7 +53,7 @@ class AniDBClient(object):
]
if not animes:
return None
return None, None
# Sort the anime by offset in ascending order
animes.sort(key=lambda a: a.episode_offset)

View File

@ -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(

View File

@ -82,7 +82,12 @@ const ProfileEditForm: FunctionComponent<Props> = ({
const itemCutoffOptions = useSelectorOptions(
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),
);