mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
fix
This commit is contained in:
parent
d41f6a5f0c
commit
94327aed2b
@ -716,30 +716,33 @@ class dialog_setting_game_internal(QWidget):
|
||||
),
|
||||
)
|
||||
for key in globalconfig["metadata"]:
|
||||
idname = globalconfig["metadata"][key]["target"]
|
||||
vndbid = QLineEdit(str(savehook_new_data[gameuid][idname]))
|
||||
if globalconfig["metadata"][key].get("idtype", 1) == 0:
|
||||
vndbid.setValidator(QIntValidator())
|
||||
vndbid.setSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed)
|
||||
|
||||
vndbid.textEdited.connect(
|
||||
functools.partial(idtypecheck, key, idname, gameuid)
|
||||
)
|
||||
vndbid.returnPressed.connect(
|
||||
functools.partial(gamdidchangedtask, key, idname, gameuid)
|
||||
)
|
||||
_vbox_internal = [
|
||||
vndbid,
|
||||
getIconButton(
|
||||
functools.partial(self.openrefmainpage, key, idname, gameuid),
|
||||
icon="fa.chrome",
|
||||
),
|
||||
getIconButton(
|
||||
functools.partial(gamdidchangedtask, key, idname, gameuid),
|
||||
icon="fa.search",
|
||||
),
|
||||
]
|
||||
try:
|
||||
idname = globalconfig["metadata"][key]["target"]
|
||||
vndbid = QLineEdit(str(savehook_new_data[gameuid][idname]))
|
||||
if globalconfig["metadata"][key].get("idtype", 1) == 0:
|
||||
vndbid.setValidator(QIntValidator())
|
||||
vndbid.setSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed)
|
||||
|
||||
vndbid.textEdited.connect(
|
||||
functools.partial(idtypecheck, key, idname, gameuid)
|
||||
)
|
||||
vndbid.returnPressed.connect(
|
||||
functools.partial(gamdidchangedtask, key, idname, gameuid)
|
||||
)
|
||||
_vbox_internal = [
|
||||
vndbid,
|
||||
getIconButton(
|
||||
functools.partial(self.openrefmainpage, key, idname, gameuid),
|
||||
icon="fa.chrome",
|
||||
),
|
||||
getIconButton(
|
||||
functools.partial(gamdidchangedtask, key, idname, gameuid),
|
||||
icon="fa.search",
|
||||
),
|
||||
]
|
||||
except:
|
||||
print_exc()
|
||||
continue
|
||||
try:
|
||||
__settting = targetmod[key].querysettingwindow
|
||||
_vbox_internal.insert(
|
||||
|
@ -140,7 +140,7 @@ def guessmaybetitle(gamepath, title):
|
||||
os.path.basename(os.path.dirname(gamepath)),
|
||||
os.path.basename(gamepath)[:-4],
|
||||
]:
|
||||
if not title:
|
||||
if not _:
|
||||
continue
|
||||
_ = _.replace("(同人ゲーム)", "").replace("(18禁ゲーム)", "")
|
||||
_ = 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)):
|
||||
continue
|
||||
lst.append(t)
|
||||
print(lst)
|
||||
return lst
|
||||
|
||||
|
||||
@ -178,7 +179,11 @@ def trysearchforid(gameuid, searchargs: list):
|
||||
for key in __:
|
||||
vid = None
|
||||
for arg in searchargs:
|
||||
vid = targetmod[key].getidbytitle(arg)
|
||||
try:
|
||||
vid = targetmod[key].getidbytitle(arg)
|
||||
except:
|
||||
print_exc()
|
||||
continue
|
||||
if vid:
|
||||
break
|
||||
if not vid:
|
||||
|
@ -28,8 +28,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/version)
|
||||
include(generate_product_version)
|
||||
|
||||
set(VERSION_MAJOR 5)
|
||||
set(VERSION_MINOR 3)
|
||||
set(VERSION_PATCH 3)
|
||||
set(VERSION_MINOR 5)
|
||||
set(VERSION_PATCH 0)
|
||||
|
||||
add_library(pch pch.cpp)
|
||||
target_precompile_headers(pch PUBLIC pch.h)
|
||||
|
Loading…
x
Reference in New Issue
Block a user