fix: fixed music download

This commit is contained in:
Haoyu Xu
2025-10-05 19:05:14 +08:00
parent 6b24b8344b
commit 49a49e5210

View File

@@ -48,7 +48,7 @@ const download = async (
}) })
mapping.musicFiles.map((item) => { mapping.musicFiles.map((item) => {
if (!file.exists(path.join(item.source, item.filename))) { if (!file.exists(path.join(item.source, item.filename))) {
const filename = item.filename.replace('.ogg', '') const filename = item.filename.replace('.ogg', '').replace(/_(intro|loop)/, "")
itemToDownload.add(filename) itemToDownload.add(filename)
} }
}) })
@@ -73,6 +73,7 @@ const download = async (
regexs.push(new RegExp(item)) regexs.push(new RegExp(item))
} }
} }
console.log(lpacksToDownload, itemToDownloadRegExp, regexs)
await unzipDownload(lpacksToDownload, dataDir, { await unzipDownload(lpacksToDownload, dataDir, {
matchRegExps: regexs, matchRegExps: regexs,
defaultRegex: itemToDownloadRegExp, defaultRegex: itemToDownloadRegExp,