mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-15 08:53:53 +08:00
rm
This commit is contained in:
parent
e04c89262a
commit
084a322de9
@ -33,7 +33,6 @@ from myutils.utils import (
|
|||||||
checkpostlangmatch,
|
checkpostlangmatch,
|
||||||
loadpostsettingwindowmethod_private,
|
loadpostsettingwindowmethod_private,
|
||||||
titlechangedtask,
|
titlechangedtask,
|
||||||
idtypecheck,
|
|
||||||
selectdebugfile,
|
selectdebugfile,
|
||||||
targetmod,
|
targetmod,
|
||||||
loopbackrecorder,
|
loopbackrecorder,
|
||||||
@ -778,17 +777,13 @@ class dialog_setting_game_internal(QWidget):
|
|||||||
idname = targetmod[key].idname
|
idname = targetmod[key].idname
|
||||||
|
|
||||||
vndbid = QLineEdit()
|
vndbid = QLineEdit()
|
||||||
if globalconfig["metadata"][key].get("idtype", 1) == 0:
|
vndbid.setText(str(savehook_new_data[gameuid].get(idname, "")))
|
||||||
vndbid.setValidator(QIntValidator())
|
|
||||||
vndbid.setText(str(savehook_new_data[gameuid].get(idname, "0")))
|
|
||||||
else:
|
|
||||||
vndbid.setText(str(savehook_new_data[gameuid].get(idname, "")))
|
|
||||||
vndbid.setSizePolicy(
|
vndbid.setSizePolicy(
|
||||||
QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed
|
QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed
|
||||||
)
|
)
|
||||||
|
|
||||||
vndbid.textEdited.connect(
|
vndbid.textEdited.connect(
|
||||||
functools.partial(idtypecheck, key, idname, gameuid)
|
functools.partial(savehook_new_data[gameuid].__setitem__, idname)
|
||||||
)
|
)
|
||||||
vndbid.returnPressed.connect(
|
vndbid.returnPressed.connect(
|
||||||
functools.partial(gamdidchangedtask, key, idname, gameuid)
|
functools.partial(gamdidchangedtask, key, idname, gameuid)
|
||||||
|
@ -232,22 +232,6 @@ def trysearchforid(gameuid, searchargs: list):
|
|||||||
threading.Thread(target=trysearchforid_1, args=(gameuid, searchargs)).start()
|
threading.Thread(target=trysearchforid_1, args=(gameuid, searchargs)).start()
|
||||||
|
|
||||||
|
|
||||||
def idtypecheck(key, idname, gameuid, vid):
|
|
||||||
if vid == "":
|
|
||||||
return
|
|
||||||
|
|
||||||
try:
|
|
||||||
if globalconfig["metadata"][key].get("idtype", 1) == 0:
|
|
||||||
try:
|
|
||||||
vid = int(vid)
|
|
||||||
except:
|
|
||||||
print(vid)
|
|
||||||
return
|
|
||||||
savehook_new_data[gameuid][idname] = vid
|
|
||||||
except:
|
|
||||||
print_exc()
|
|
||||||
|
|
||||||
|
|
||||||
def gamdidchangedtask(key, idname, gameuid):
|
def gamdidchangedtask(key, idname, gameuid):
|
||||||
vid = savehook_new_data[gameuid][idname]
|
vid = savehook_new_data[gameuid][idname]
|
||||||
dispatchsearchfordata(gameuid, key, vid)
|
dispatchsearchfordata(gameuid, key, vid)
|
||||||
|
@ -242,7 +242,6 @@
|
|||||||
"searchfordatatasks": [],
|
"searchfordatatasks": [],
|
||||||
"useproxy": false,
|
"useproxy": false,
|
||||||
"target": "vid",
|
"target": "vid",
|
||||||
"idtype": 0,
|
|
||||||
"args": {
|
"args": {
|
||||||
"Token": ""
|
"Token": ""
|
||||||
}
|
}
|
||||||
@ -262,7 +261,6 @@
|
|||||||
"searchfordatatasks": [],
|
"searchfordatatasks": [],
|
||||||
"useproxy": true,
|
"useproxy": true,
|
||||||
"target": "bgmsid",
|
"target": "bgmsid",
|
||||||
"idtype": 0,
|
|
||||||
"args": {
|
"args": {
|
||||||
"access-token": ""
|
"access-token": ""
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user