MCPcopy Index your code
hub / github.com/stemdeckapp/stemdeck / syncStemNamesFromAPI

Function syncStemNamesFromAPI

static/js/constants.js:6–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4export let TRACK_NAMES = ["original", ...STEM_NAMES];
5
6export async function syncStemNamesFromAPI() {
7 try {
8 const res = await fetch("/api/config");
9 if (!res.ok) return;
10 const data = await res.json();
11 if (Array.isArray(data.stem_names) && data.stem_names.length > 0) {
12 STEM_NAMES = data.stem_names;
13 TRACK_NAMES = ["original", ...STEM_NAMES];
14 }
15 } catch (e) {
16 console.warn("[constants] failed to sync stem names from API:", e);
17 }
18}
19
20export const STEM_DISPLAY = {
21 vocals: "Vocals",

Callers 1

main.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected