MCPcopy
hub / github.com/stemdeckapp/stemdeck / loadLibrary

Function loadLibrary

static/mobile/app.js:924–936  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

922// Load the real library from /api/jobs (newest first). On success, seed the
923// Mixer with the most recent track if nothing is selected yet.
924async function loadLibrary() {
925 state.libState = "loading";
926 render();
927 try {
928 const jobs = await fetchJobs();
929 state.tracks = jobs.map(jobToCard).sort((a, b) => b.createdAt - a.createdAt);
930 state.libState = state.tracks.length ? "ready" : "empty";
931 } catch (e) {
932 console.warn("[mobile] failed to load library:", e);
933 state.libState = "error";
934 }
935 render();
936}
937
938render();
939loadLibrary();

Callers 2

_onExtractStateFunction · 0.85
app.jsFile · 0.85

Calls 2

fetchJobsFunction · 0.90
renderFunction · 0.70

Tested by

no test coverage detected