From 57b14d80402b8f5807a3edf830666784783a7f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Fri, 28 Jun 2024 14:06:41 +0800 Subject: [PATCH] norm --- LunaTranslator/LunaTranslator/metadata/abstract.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/LunaTranslator/LunaTranslator/metadata/abstract.py b/LunaTranslator/LunaTranslator/metadata/abstract.py index 2bbc9d0f..fc701c7f 100644 --- a/LunaTranslator/LunaTranslator/metadata/abstract.py +++ b/LunaTranslator/LunaTranslator/metadata/abstract.py @@ -146,11 +146,14 @@ class common: developers = data.get("developers", []) webtags = data.get("webtags", []) imagepath_all = data.get("imagepath_all", []) - + normaled = [ + os.path.normpath(os.path.abspath(_)) + for _ in savehook_new_data[gameuid]["imagepath_all"] + ] for _ in imagepath_all: if _ is None: continue - if _ not in savehook_new_data[gameuid]["imagepath_all"]: + if os.path.normpath(os.path.abspath(_)) not in normaled: savehook_new_data[gameuid]["imagepath_all"].append(_) if title: if not savehook_new_data[gameuid]["istitlesetted"]: