melhorando a leitura de projetos no mmpCreator
Deploy / Deploy (push) Successful in 2m16s
Details
Deploy / Deploy (push) Successful in 2m16s
Details
This commit is contained in:
parent
a636b514ed
commit
d86348cfac
|
|
@ -110,9 +110,9 @@ export async function parseBeatIndexJson(data) {
|
|||
basename(t.sample_info?.src) ||
|
||||
`${basename(t.sample_info?.src || "")}`; // ✅ sem sample_info solto
|
||||
|
||||
const resolvedUrl =
|
||||
pathMap[fileName] ||
|
||||
`/src_mmpSearch/samples/samples/${data?.file || data?.original_title || ""}/${fileName}`; // ✅ data
|
||||
const encodedFileName = encodeURIComponent(fileName);
|
||||
const base = `/src_mmpSearch/samples/samples/${encodeURIComponent(data?.file || data?.original_title || "")}`;
|
||||
const resolvedUrl = pathMap[fileName] || `${base}/${encodedFileName}`;
|
||||
|
||||
// ✅ tempo no padrão do seu playlist (12 ticks por step)
|
||||
const startSec = ((Number(t.sample_info?.pos || 0) / 12) * secondsPerStep);
|
||||
|
|
@ -198,7 +198,7 @@ export async function handleFileLoad(file) {
|
|||
}
|
||||
|
||||
export async function loadBeatIndexFromServer(fileName) {
|
||||
const response = await fetch(`src_mmpSearch/index/${fileName}.json`);
|
||||
const response = await fetch(`src_mmpSearch/metadata/${fileName}.json`);
|
||||
if (!response.ok) throw new Error("Não foi possível carregar beat index");
|
||||
const data = await response.json();
|
||||
sendAction({ type: "LOAD_BEAT_INDEX", data });
|
||||
|
|
|
|||
Loading…
Reference in New Issue