mirror of https://github.com/morpheus65535/bazarr
fix after merging dev branch
This commit is contained in:
parent
3aa504d83b
commit
16fd714a07
|
@ -30,7 +30,7 @@ const defaultCutoffOptions: SelectorOption<Language.ProfileItem>[] = [
|
|||
// eslint-disable-next-line camelcase
|
||||
audio_exclude: "False",
|
||||
forced: "False",
|
||||
hi: "False",
|
||||
hi: "also",
|
||||
language: "any",
|
||||
},
|
||||
},
|
||||
|
@ -88,7 +88,7 @@ const ProfileEditForm: FunctionComponent<Props> = ({
|
|||
form.values.items,
|
||||
(v) => {
|
||||
const suffix =
|
||||
v.hi === "True" ? ":hi" : v.forced === "True" ? ":forced" : "";
|
||||
v.hi === "only" ? ":hi" : v.forced === "True" ? ":forced" : "";
|
||||
|
||||
return v.language + suffix;
|
||||
},
|
||||
|
@ -190,12 +190,8 @@ const ProfileEditForm: FunctionComponent<Props> = ({
|
|||
const selectValue = useMemo(() => {
|
||||
if (item.forced === "True") {
|
||||
return "forced";
|
||||
} else if (item.hi === "also") {
|
||||
return "also";
|
||||
} else if (item.hi === "only") {
|
||||
return "only";
|
||||
} else if (item.hi === "never") {
|
||||
return "never";
|
||||
} else {
|
||||
return item.hi;
|
||||
}
|
||||
}, [item.forced, item.hi]);
|
||||
|
||||
|
@ -209,7 +205,7 @@ const ProfileEditForm: FunctionComponent<Props> = ({
|
|||
...item,
|
||||
hi: value,
|
||||
forced: value === "forced" ? "True" : "False",
|
||||
});
|
||||
} as Language.ProfileItem);
|
||||
}
|
||||
}}
|
||||
></Select>
|
||||
|
|
|
@ -28,7 +28,7 @@ declare namespace Language {
|
|||
id: number;
|
||||
audio_exclude: PythonBoolean;
|
||||
forced: PythonBoolean;
|
||||
hi: string;
|
||||
hi: "never" | "also" | "only";
|
||||
language: CodeType;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ export function useProfileItemsToLanguages(profile?: Language.Profile) {
|
|||
profile?.items.map<Language.Info>(({ language: code, hi, forced }) => {
|
||||
const name = data?.find((v) => v.code2 === code)?.name ?? "";
|
||||
return {
|
||||
hi: hi === "True",
|
||||
hi: hi === "only",
|
||||
forced: forced === "True",
|
||||
code2: code,
|
||||
name,
|
||||
|
|
Loading…
Reference in New Issue