From 263bdfd8ff1528ddf0d4cf0680ce33b8522b7292 Mon Sep 17 00:00:00 2001 From: zurdi Date: Tue, 1 Aug 2023 13:29:09 +0200 Subject: [PATCH] multipart roms scan fixed --- backend/utils/fs.py | 4 ++-- frontend/src/views/library/Scan.vue | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/backend/utils/fs.py b/backend/utils/fs.py index 7933b6607..829ca2e12 100644 --- a/backend/utils/fs.py +++ b/backend/utils/fs.py @@ -156,8 +156,8 @@ def _exclude_multi_roms(roms) -> list[str]: def get_rom_files(rom: str, roms_path: str) -> list[str]: rom_files: list = [] - for path, _, files in os.walk(f"{LIBRARY_BASE_PATH}/{roms_path}/{rom}"): - [rom_files.append(f"{Path(path, f)}".replace(f"{LIBRARY_BASE_PATH}/{roms_path}/{rom}/", '')) for f in _exclude_files(files, 'multi_parts')] + for path, d, files in os.walk(f"{roms_path}/{rom}"): + [rom_files.append(f"{Path(path, f)}".replace(f"{roms_path}/{rom}/", '')) for f in _exclude_files(files, 'multi_parts')] return rom_files diff --git a/frontend/src/views/library/Scan.vue b/frontend/src/views/library/Scan.vue index 2b331d0c2..57b8ecf1f 100644 --- a/frontend/src/views/library/Scan.vue +++ b/frontend/src/views/library/Scan.vue @@ -24,14 +24,14 @@ async function scan() { scannedPlatforms.value.push({ p_name: platform[0], p_slug: platform[1], - r: [], + rom: [], }); scanningPlatform.value = platform[1]; }); - socket.on("scan:scanning_rom", (r) => { - scannedPlatforms.value.forEach((e) => { - if (e["p_slug"] == scanningPlatform.value) { - e["r"].push(r); + socket.on("scan:scanning_rom", (rom) => { + scannedPlatforms.value.forEach((platform) => { + if (platform["p_slug"] == scanningPlatform.value) { + platform["rom"].push(rom); } }); }); @@ -119,14 +119,14 @@ async function scan() { /> - + - + - {{ d["p_name"] }} - - - {{ r }} + {{ platform["p_name"] }} + + - {{ rom }}