This commit is contained in:
恍兮惚兮 2024-06-29 00:14:04 +08:00
parent d41f6a5f0c
commit 94327aed2b
3 changed files with 35 additions and 27 deletions

View File

@ -716,6 +716,7 @@ class dialog_setting_game_internal(QWidget):
), ),
) )
for key in globalconfig["metadata"]: for key in globalconfig["metadata"]:
try:
idname = globalconfig["metadata"][key]["target"] idname = globalconfig["metadata"][key]["target"]
vndbid = QLineEdit(str(savehook_new_data[gameuid][idname])) vndbid = QLineEdit(str(savehook_new_data[gameuid][idname]))
if globalconfig["metadata"][key].get("idtype", 1) == 0: if globalconfig["metadata"][key].get("idtype", 1) == 0:
@ -739,7 +740,9 @@ class dialog_setting_game_internal(QWidget):
icon="fa.search", icon="fa.search",
), ),
] ]
except:
print_exc()
continue
try: try:
__settting = targetmod[key].querysettingwindow __settting = targetmod[key].querysettingwindow
_vbox_internal.insert( _vbox_internal.insert(

View File

@ -140,7 +140,7 @@ def guessmaybetitle(gamepath, title):
os.path.basename(os.path.dirname(gamepath)), os.path.basename(os.path.dirname(gamepath)),
os.path.basename(gamepath)[:-4], os.path.basename(gamepath)[:-4],
]: ]:
if not title: if not _:
continue continue
_ = _.replace("(同人ゲーム)", "").replace("(18禁ゲーム)", "") _ = _.replace("(同人ゲーム)", "").replace("(18禁ゲーム)", "")
_ = re.sub(r"\[RJ(.*?)\]", "", _) _ = re.sub(r"\[RJ(.*?)\]", "", _)
@ -160,6 +160,7 @@ def guessmaybetitle(gamepath, title):
if (len(t) < 10) and (all(ord(c) < 128 for c in t)): if (len(t) < 10) and (all(ord(c) < 128 for c in t)):
continue continue
lst.append(t) lst.append(t)
print(lst)
return lst return lst
@ -178,7 +179,11 @@ def trysearchforid(gameuid, searchargs: list):
for key in __: for key in __:
vid = None vid = None
for arg in searchargs: for arg in searchargs:
try:
vid = targetmod[key].getidbytitle(arg) vid = targetmod[key].getidbytitle(arg)
except:
print_exc()
continue
if vid: if vid:
break break
if not vid: if not vid:

View File

@ -28,8 +28,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/version)
include(generate_product_version) include(generate_product_version)
set(VERSION_MAJOR 5) set(VERSION_MAJOR 5)
set(VERSION_MINOR 3) set(VERSION_MINOR 5)
set(VERSION_PATCH 3) set(VERSION_PATCH 0)
add_library(pch pch.cpp) add_library(pch pch.cpp)
target_precompile_headers(pch PUBLIC pch.h) target_precompile_headers(pch PUBLIC pch.h)