From 9169938448b3cee0d3b5fb51126310475a9d3f26 Mon Sep 17 00:00:00 2001 From: Tony Ribeiro Date: Mon, 13 Nov 2023 23:20:36 +0100 Subject: [PATCH] Fix listing of live2d model file for non-model3 type models. --- src/assets.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assets.js b/src/assets.js index 0087d3a62..93e2239df 100644 --- a/src/assets.js +++ b/src/assets.js @@ -94,7 +94,7 @@ function registerEndpoints(app, jsonParser) { //console.debug("FILE FOUND:",files) for (let file of files) { file = path.normalize(file.replace('public'+path.sep, '')); - if (file.endsWith("model3.json")) { + if (file.includes("model") && file.endsWith(".json")) { //console.debug("Asset live2d model found:",file) output[folder].push(path.normalize(path.join(file))); } @@ -273,7 +273,7 @@ function registerEndpoints(app, jsonParser) { if (fs.statSync(live2dModelPath).isDirectory()) { for (let file of fs.readdirSync(live2dModelPath)) { //console.debug("Character live2d model found:", file) - if (file.includes("model")) + if (file.includes("model") && file.endsWith(".json")) output.push(path.join("characters", name, category, modelFolder, file)); } }