playlist importando sample track
Deploy / Deploy (push) Successful in 1m58s
Details
Deploy / Deploy (push) Successful in 1m58s
Details
This commit is contained in:
parent
7c42fa0580
commit
fb48d21eaf
|
|
@ -50,6 +50,16 @@ function ticksToSeconds(ticks) {
|
|||
return seconds;
|
||||
}
|
||||
|
||||
function dirname(path) {
|
||||
const parts = String(path || "").split(/[\\/]/);
|
||||
parts.pop();
|
||||
return parts.join("/");
|
||||
}
|
||||
|
||||
function lastFolder(path) {
|
||||
const dir = dirname(path);
|
||||
return String(dir).split(/[\\/]/).pop();
|
||||
}
|
||||
|
||||
export async function parseBeatIndexJson(data) {
|
||||
resetProjectState();
|
||||
|
|
@ -111,7 +121,8 @@ export async function parseBeatIndexJson(data) {
|
|||
`${basename(t.sample_info?.src || "")}`; // ✅ sem sample_info solto
|
||||
|
||||
const encodedFileName = encodeURIComponent(fileName);
|
||||
const base = `/src_mmpSearch/samples/samples/${encodeURIComponent(data?.file || data?.original_title || "")}`;
|
||||
const projectName = encodeURIComponent(data?.file || data?.original_title || "");
|
||||
const base = `${SAMPLE_SRC}/${projectName}`; // ✅ SAMPLE_SRC/{project}
|
||||
const resolvedUrl = pathMap[fileName] || `${base}/${encodedFileName}`;
|
||||
|
||||
// ✅ tempo no padrão do seu playlist (12 ticks por step)
|
||||
|
|
|
|||
Loading…
Reference in New Issue