Skip to content

Commit 451d579

Browse files
hi-ogawaOpenCode
andcommitted
refactor: align two-stems preference name
Co-authored-by: OpenCode <noreply@opencode.ai>
1 parent 5e30567 commit 451d579

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

packages/app/src/app.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ export function App() {
3131
Partial<Record<ModelFilename, string>>
3232
>({});
3333

34-
const { model, method, shifts } = preferences;
35-
const twoStems = preferences.targetStem;
34+
const { model, method, shifts, twoStems } = preferences;
3635

3736
const selectedModelFiles = Object.values(modelFiles);
3837
const requiredFiles = requiredModelFiles(
@@ -264,8 +263,8 @@ export function App() {
264263
onChange={(event) =>
265264
setPreferences((current) => ({
266265
...current,
267-
targetStem: (event.target.value ||
268-
null) as typeof current.targetStem,
266+
twoStems: (event.target.value ||
267+
null) as typeof current.twoStems,
269268
}))
270269
}
271270
>

packages/app/src/lib/preferences.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const STORAGE_KEY = "demucs-onnx:main:v2";
44

55
const preferencesSchema = z.object({
66
model: z.enum(["htdemucs", "htdemucs_ft"]),
7-
targetStem: z.enum(["drums", "bass", "other", "vocals"]).nullable(),
7+
twoStems: z.enum(["drums", "bass", "other", "vocals"]).nullable(),
88
method: z.enum(["add", "minus"]),
99
shifts: z.number().int().min(1).max(4),
1010
});
@@ -13,7 +13,7 @@ export type Preferences = z.infer<typeof preferencesSchema>;
1313

1414
const DEFAULT_PREFERENCES: Preferences = {
1515
model: "htdemucs",
16-
targetStem: null,
16+
twoStems: null,
1717
method: "add",
1818
shifts: 1,
1919
};

0 commit comments

Comments
 (0)