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.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"]

View File

@ -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": __,