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,
|
||||
loadpostsettingwindowmethod_private,
|
||||
titlechangedtask,
|
||||
idtypecheck,
|
||||
selectdebugfile,
|
||||
targetmod,
|
||||
loopbackrecorder,
|
||||
@ -778,17 +777,13 @@ class dialog_setting_game_internal(QWidget):
|
||||
idname = targetmod[key].idname
|
||||
|
||||
vndbid = QLineEdit()
|
||||
if globalconfig["metadata"][key].get("idtype", 1) == 0:
|
||||
vndbid.setValidator(QIntValidator())
|
||||
vndbid.setText(str(savehook_new_data[gameuid].get(idname, "0")))
|
||||
else:
|
||||
vndbid.setText(str(savehook_new_data[gameuid].get(idname, "")))
|
||||
vndbid.setText(str(savehook_new_data[gameuid].get(idname, "")))
|
||||
vndbid.setSizePolicy(
|
||||
QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed
|
||||
)
|
||||
|
||||
vndbid.textEdited.connect(
|
||||
functools.partial(idtypecheck, key, idname, gameuid)
|
||||
functools.partial(savehook_new_data[gameuid].__setitem__, idname)
|
||||
)
|
||||
vndbid.returnPressed.connect(
|
||||
functools.partial(gamdidchangedtask, key, idname, gameuid)
|
||||
|
@ -232,22 +232,6 @@ def trysearchforid(gameuid, searchargs: list):
|
||||
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):
|
||||
vid = savehook_new_data[gameuid][idname]
|
||||
dispatchsearchfordata(gameuid, key, vid)
|
||||
|
@ -242,7 +242,6 @@
|
||||
"searchfordatatasks": [],
|
||||
"useproxy": false,
|
||||
"target": "vid",
|
||||
"idtype": 0,
|
||||
"args": {
|
||||
"Token": ""
|
||||
}
|
||||
@ -262,7 +261,6 @@
|
||||
"searchfordatatasks": [],
|
||||
"useproxy": true,
|
||||
"target": "bgmsid",
|
||||
"idtype": 0,
|
||||
"args": {
|
||||
"access-token": ""
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user