From 7b69308293c71793819f00de8f835f1b92127c4e 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: Mon, 16 Sep 2024 14:02:04 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/metadata/vndb.py | 14 ++++++-------- plugins/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/LunaTranslator/LunaTranslator/metadata/vndb.py b/LunaTranslator/LunaTranslator/metadata/vndb.py index 27f1309c..c66dab4e 100644 --- a/LunaTranslator/LunaTranslator/metadata/vndb.py +++ b/LunaTranslator/LunaTranslator/metadata/vndb.py @@ -122,23 +122,21 @@ def getinfosbyvid(proxy, vid): def getcharnamemapbyid(proxy, vid): js = safegetvndbjson( proxy, - "character", + "vn", { - "filters": [ - "vn", - "=", - ["id", "=", vid], - ], - "fields": "name,original", + "filters": ["id", "=", vid], + "fields": "va.character.name,va.character.original", }, ) + print(js) if js: - res = js["results"] + res = js["results"][0]["va"] else: return {} namemap = {} try: for r in res: + r = r["character"] namemap[r["original"]] = r["name"] except: pass diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 9d445e37..83684c0a 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 36) -set(VERSION_PATCH 0) +set(VERSION_PATCH 1) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)