pull/2475/head
morpheus65535 9 months ago
parent c22435dacf
commit 2e2f0eea3b

@ -239,11 +239,11 @@ def list_missing_subtitles(no=None, epno=None, send_event=True):
desired_item = {'language': item['language'], 'forced': item['forced'], 'hi': 'False'} desired_item = {'language': item['language'], 'forced': item['forced'], 'hi': 'False'}
if desired_item not in actual_subtitles_list: if desired_item not in actual_subtitles_list:
missing_subtitles_list.append(desired_item) missing_subtitles_list.append(desired_item)
elif item['hi'] == 'hi_only': elif item['hi'] == 'only':
desired_item = {'language': item['language'], 'forced': item['forced'], 'hi': 'True'} desired_item = {'language': item['language'], 'forced': item['forced'], 'hi': 'True'}
if desired_item not in actual_subtitles_list: if desired_item not in actual_subtitles_list:
missing_subtitles_list.append(desired_item) missing_subtitles_list.append(desired_item)
elif item['hi'] == 'hi_also': elif item['hi'] == 'also':
desired_items = [{'language': item['language'], 'forced': item['forced'], 'hi': 'True'}, desired_items = [{'language': item['language'], 'forced': item['forced'], 'hi': 'True'},
{'language': item['language'], 'forced': item['forced'], 'hi': 'False'}] {'language': item['language'], 'forced': item['forced'], 'hi': 'False'}]
if [x for x in desired_items if x in actual_subtitles_list]: if [x for x in desired_items if x in actual_subtitles_list]:

@ -43,11 +43,11 @@ const subtitlesTypeOptions: SelectorOption<string>[] = [
}, },
{ {
label: "Hearing-impaired only", label: "Hearing-impaired only",
value: "hi_only", value: "only",
}, },
{ {
label: "Normal or hearing-impaired", label: "Normal or hearing-impaired",
value: "hi_also", value: "also",
}, },
{ {
label: "Forced (foreign part only)", label: "Forced (foreign part only)",
@ -135,7 +135,7 @@ const ProfileEditForm: FunctionComponent<Props> = ({
language, language,
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
audio_exclude: "False", audio_exclude: "False",
hi: "Also", hi: "also",
forced: "False", forced: "False",
}; };
@ -186,9 +186,9 @@ const ProfileEditForm: FunctionComponent<Props> = ({
if (item.forced === "True") { if (item.forced === "True") {
return "forced"; return "forced";
} else if (item.hi === "also") { } else if (item.hi === "also") {
return "hi_also"; return "also";
} else if (item.hi === "only") { } else if (item.hi === "only") {
return "hi_only"; return "only";
} else if (item.hi === "never") { } else if (item.hi === "never") {
return "never"; return "never";
} }

Loading…
Cancel
Save