Fix a issue that hi and forced is not properly updated on series subtitle upload modal

This commit is contained in:
LASER-Yi 2021-08-26 20:11:33 +08:00
parent 7e48413493
commit 50fb06b23a

View file

@ -90,14 +90,15 @@ const SeriesUploadModal: FunctionComponent<SeriesProps & BaseModalProps> = ({
const tasks = items const tasks = items
.filter((v) => v.payload.instance !== undefined) .filter((v) => v.payload.instance !== undefined)
.map((v) => { .map((v) => {
const { code2, hi, forced } = v.language!; const { hi, forced, payload, language } = v;
const { sonarrEpisodeId: episodeid } = v.payload.instance!; const { code2 } = language!;
const { sonarrEpisodeId: episodeid } = payload.instance!;
const form: FormType.UploadSubtitle = { const form: FormType.UploadSubtitle = {
file: v.file, file: v.file,
language: code2, language: code2,
hi: hi ?? false, hi: hi,
forced: forced ?? false, forced: forced,
}; };
return createTask( return createTask(