playlist importando sample track

This commit is contained in:
JotaChina committed 2025-12-25 18:14:31 -03:00
1 parent 14eb463f2d
commit 7bfbffd700
2 files changed
+13 -4

No files matched your search

+10 -1
View File
@@ -145,9 +145,18 @@ export async function loadAudioForClip(clip) {
}
try {
const safeUrl = encodeURI(clip.sourcePath).replace(/#/g, "%23");
// ✅ NÃO use encodeURI/encodeURIComponent aqui
let safeUrl = String(clip.sourcePath);
// se chegou double-encoded, normaliza (caso %2523 apareça)
safeUrl = safeUrl.replace(/%2523/gi, "%23");
// se chegou com # cru, escapa
safeUrl = safeUrl.replace(/#/g, "%23");
const response = await fetch(safeUrl);
if (!response.ok)
throw new Error(`Falha ao buscar áudio: ${clip.sourcePath}`);