diff --git a/LunaTranslator/LunaTranslator/LunaTranslator.py b/LunaTranslator/LunaTranslator/LunaTranslator.py index 17d52c70..e4c74dcc 100644 --- a/LunaTranslator/LunaTranslator/LunaTranslator.py +++ b/LunaTranslator/LunaTranslator/LunaTranslator.py @@ -173,6 +173,7 @@ class MAINUI: ) ) self.currenttext = text + self.currenttranslate = text self.currentread = text return else: @@ -226,6 +227,7 @@ class MAINUI: if onlytrans == False: self.dispatchoutputer(text) self.currenttext = text + self.currenttranslate = "" if globalconfig["read_raw"]: self.currentread = text self.autoreadcheckname() @@ -384,7 +386,7 @@ class MAINUI: self.textsource.sqlqueueput((contentraw, classname, res)) except: pass - self.currenttranslate = res + self.currenttranslate = self.currenttranslate + "\n" + res if ( globalconfig["embedded"]["as_fast_as_posible"] or classname == globalconfig["embedded"]["translator_2"] diff --git a/LunaTranslator/LunaTranslator/myutils/metadata/vndb.py b/LunaTranslator/LunaTranslator/myutils/metadata/vndb.py index c2d391c7..ac50cddd 100644 --- a/LunaTranslator/LunaTranslator/myutils/metadata/vndb.py +++ b/LunaTranslator/LunaTranslator/myutils/metadata/vndb.py @@ -272,9 +272,9 @@ class searcher(common): return int(vid[1:]) return None - def searchfordata(self, vid): + def searchfordata(self, _vid): os.makedirs("./cache/vndb", exist_ok=True) - vid = "v{}".format(vid) + vid = "v{}".format(_vid) img = getimgbyid(self.proxy, vid) title = gettitlebyid(self.proxy, vid) namemap = getcharnamemapbyid(self.proxy, vid) @@ -283,7 +283,7 @@ class searcher(common): # 没代理时下不动那个tag的json vndbtags = gettagfromhtml( self.dispatchdownloadtask( - self.refmainpage(vid), ishtml=True, delay=False + self.refmainpage(_vid), ishtml=True, delay=False ) ) developers = getdevelopersbyid(self.proxy, vid) @@ -304,7 +304,7 @@ class searcher(common): "title": title, "infopath": parsehtmlmethod( self.dispatchdownloadtask( - self.refmainpage(vid), ishtml=True, delay=False + self.refmainpage(_vid), ishtml=True, delay=False ) ), "imagepath_all": __,