This commit is contained in:
恍兮惚兮 2024-06-08 02:28:28 +08:00
parent 6aea1f3e00
commit 223165a825
2 changed files with 7 additions and 5 deletions

View File

@ -173,6 +173,7 @@ class MAINUI:
) )
) )
self.currenttext = text self.currenttext = text
self.currenttranslate = text
self.currentread = text self.currentread = text
return return
else: else:
@ -226,6 +227,7 @@ class MAINUI:
if onlytrans == False: if onlytrans == False:
self.dispatchoutputer(text) self.dispatchoutputer(text)
self.currenttext = text self.currenttext = text
self.currenttranslate = ""
if globalconfig["read_raw"]: if globalconfig["read_raw"]:
self.currentread = text self.currentread = text
self.autoreadcheckname() self.autoreadcheckname()
@ -384,7 +386,7 @@ class MAINUI:
self.textsource.sqlqueueput((contentraw, classname, res)) self.textsource.sqlqueueput((contentraw, classname, res))
except: except:
pass pass
self.currenttranslate = res self.currenttranslate = self.currenttranslate + "\n" + res
if ( if (
globalconfig["embedded"]["as_fast_as_posible"] globalconfig["embedded"]["as_fast_as_posible"]
or classname == globalconfig["embedded"]["translator_2"] or classname == globalconfig["embedded"]["translator_2"]

View File

@ -272,9 +272,9 @@ class searcher(common):
return int(vid[1:]) return int(vid[1:])
return None return None
def searchfordata(self, vid): def searchfordata(self, _vid):
os.makedirs("./cache/vndb", exist_ok=True) os.makedirs("./cache/vndb", exist_ok=True)
vid = "v{}".format(vid) vid = "v{}".format(_vid)
img = getimgbyid(self.proxy, vid) img = getimgbyid(self.proxy, vid)
title = gettitlebyid(self.proxy, vid) title = gettitlebyid(self.proxy, vid)
namemap = getcharnamemapbyid(self.proxy, vid) namemap = getcharnamemapbyid(self.proxy, vid)
@ -283,7 +283,7 @@ class searcher(common):
# 没代理时下不动那个tag的json # 没代理时下不动那个tag的json
vndbtags = gettagfromhtml( vndbtags = gettagfromhtml(
self.dispatchdownloadtask( self.dispatchdownloadtask(
self.refmainpage(vid), ishtml=True, delay=False self.refmainpage(_vid), ishtml=True, delay=False
) )
) )
developers = getdevelopersbyid(self.proxy, vid) developers = getdevelopersbyid(self.proxy, vid)
@ -304,7 +304,7 @@ class searcher(common):
"title": title, "title": title,
"infopath": parsehtmlmethod( "infopath": parsehtmlmethod(
self.dispatchdownloadtask( self.dispatchdownloadtask(
self.refmainpage(vid), ishtml=True, delay=False self.refmainpage(_vid), ishtml=True, delay=False
) )
), ),
"imagepath_all": __, "imagepath_all": __,