subtitles default to all-unchecked; connect the keep-checkbox label
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+19
-15
@@ -318,15 +318,17 @@ const TaskInputForm = ({ inputDefs, values, onChange, autoFilledKeys, audioTrack
|
||||
const e = entryFor(t);
|
||||
return (
|
||||
<div key={t.id} className="flex items-center gap-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={e.keep}
|
||||
onChange={() => update(t.id, { keep: !e.keep })}
|
||||
className="accent-duck-teal cursor-pointer shrink-0"
|
||||
/>
|
||||
<span className="text-[10px] font-mono uppercase w-9 shrink-0 text-duck-dark/40 dark:text-foreground/40">
|
||||
{t.lang || 'und'}
|
||||
</span>
|
||||
<label className="flex items-center gap-2 cursor-pointer shrink-0">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={e.keep}
|
||||
onChange={() => update(t.id, { keep: !e.keep })}
|
||||
className="accent-duck-teal cursor-pointer"
|
||||
/>
|
||||
<span className="text-[10px] font-mono uppercase w-9 text-duck-dark/40 dark:text-foreground/40">
|
||||
{t.lang || 'und'}
|
||||
</span>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
value={e.label}
|
||||
@@ -559,9 +561,9 @@ const pickerKinds = (defs: Record<string, TaskInputDef> | null): PickerKinds =>
|
||||
});
|
||||
|
||||
const defaultGroupSel = (g: FolderTrackGroup): GroupSel => ({
|
||||
audio: g.audioTracks.map((t) => t.id).join(','), // keep all
|
||||
subs: g.subtitleTracks.map((t) => t.id).join(','), // keep all
|
||||
subEdit: g.subtitleTracks.map((t) => ({ id: t.id, keep: true, label: trackLabel(t) })),
|
||||
audio: g.audioTracks.map((t) => t.id).join(','), // audio: keep all
|
||||
subs: 'none', // subtitles: keep none by default — you usually want only a few of many
|
||||
subEdit: g.subtitleTracks.map((t) => ({ id: t.id, keep: false, label: trackLabel(t) })),
|
||||
});
|
||||
|
||||
// Does a group's selection change anything vs keep-all + original labels?
|
||||
@@ -693,8 +695,10 @@ const PerGroupTrackConfig = ({ groups, has, sel, onChange, probing }: PerGroupTr
|
||||
const e = entryFor(t);
|
||||
return (
|
||||
<div key={t.id} className="flex items-center gap-2">
|
||||
<input type="checkbox" checked={e.keep} onChange={() => updateEdit(t.id, { keep: !e.keep })} className="accent-duck-teal cursor-pointer shrink-0" />
|
||||
<span className="text-[10px] font-mono uppercase w-9 shrink-0 text-duck-dark/40 dark:text-foreground/40">{t.lang || 'und'}</span>
|
||||
<label className="flex items-center gap-2 cursor-pointer shrink-0">
|
||||
<input type="checkbox" checked={e.keep} onChange={() => updateEdit(t.id, { keep: !e.keep })} className="accent-duck-teal cursor-pointer" />
|
||||
<span className="text-[10px] font-mono uppercase w-9 text-duck-dark/40 dark:text-foreground/40">{t.lang || 'und'}</span>
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
value={e.label}
|
||||
@@ -802,7 +806,7 @@ const ScriptRunner = ({ taskDirName, autoInputs, context, cwd, entryType, filePa
|
||||
if (def.type === 'audio_tracks') next[key] = aud.map((t) => t.id).join(',') || 'none';
|
||||
if (def.type === 'subtitle_tracks') next[key] = 'none';
|
||||
if (def.type === 'subtitle_edit')
|
||||
next[key] = JSON.stringify(sub.map((t) => ({ id: t.id, keep: true, label: trackLabel(t) })));
|
||||
next[key] = JSON.stringify(sub.map((t) => ({ id: t.id, keep: false, label: trackLabel(t) })));
|
||||
}
|
||||
return next;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user