mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24: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"]:
|
for key in globalconfig["metadata"]:
|
||||||
idname = globalconfig["metadata"][key]["target"]
|
try:
|
||||||
vndbid = QLineEdit(str(savehook_new_data[gameuid][idname]))
|
idname = globalconfig["metadata"][key]["target"]
|
||||||
if globalconfig["metadata"][key].get("idtype", 1) == 0:
|
vndbid = QLineEdit(str(savehook_new_data[gameuid][idname]))
|
||||||
vndbid.setValidator(QIntValidator())
|
if globalconfig["metadata"][key].get("idtype", 1) == 0:
|
||||||
vndbid.setSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed)
|
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",
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
||||||
|
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:
|
try:
|
||||||
__settting = targetmod[key].querysettingwindow
|
__settting = targetmod[key].querysettingwindow
|
||||||
_vbox_internal.insert(
|
_vbox_internal.insert(
|
||||||
|
@ -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:
|
||||||
vid = targetmod[key].getidbytitle(arg)
|
try:
|
||||||
|
vid = targetmod[key].getidbytitle(arg)
|
||||||
|
except:
|
||||||
|
print_exc()
|
||||||
|
continue
|
||||||
if vid:
|
if vid:
|
||||||
break
|
break
|
||||||
if not vid:
|
if not vid:
|
||||||
|
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user