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

Function deriveQuality

static/js/catalog.js:357–368  ·  view source on GitHub ↗
(sourceUrl)

Source from the content-addressed store, hash-verified

355}
356
357function deriveQuality(sourceUrl) {
358 if (!sourceUrl) return "—";
359 if (sourceUrl.startsWith("local:")) {
360 const ext = sourceUrl.split(".").pop()?.toLowerCase();
361 if (ext === "wav") return "Lossless (WAV)";
362 if (ext === "mp3") return "Compressed (MP3)";
363 return "Local file";
364 }
365 if (sourceUrl.includes("youtube.com") || sourceUrl.includes("youtu.be")) return "High";
366 if (sourceUrl.includes("soundcloud.com")) return "Compressed (MP3)";
367 return "—";
368}
369
370function drLabel(dr) {
371 if (dr < 7) return "Compressed";

Callers 1

applyTrackInfoToPanelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected