diff --git a/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py b/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py index 9fc99f65..2bf828bf 100644 --- a/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py +++ b/LunaTranslator/LunaTranslator/gui/dialog_savedgame.py @@ -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) diff --git a/LunaTranslator/LunaTranslator/myutils/utils.py b/LunaTranslator/LunaTranslator/myutils/utils.py index cce246bd..40cb87aa 100644 --- a/LunaTranslator/LunaTranslator/myutils/utils.py +++ b/LunaTranslator/LunaTranslator/myutils/utils.py @@ -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) diff --git a/LunaTranslator/files/defaultconfig/config.json b/LunaTranslator/files/defaultconfig/config.json index f41c8d3b..03582abf 100644 --- a/LunaTranslator/files/defaultconfig/config.json +++ b/LunaTranslator/files/defaultconfig/config.json @@ -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": "" }