mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
.
This commit is contained in:
parent
eb75096b51
commit
85d6aa0ba3
@ -22,11 +22,7 @@ def _getproxy():
|
||||
|
||||
|
||||
def getproxy(pair=None):
|
||||
if (
|
||||
pair is None
|
||||
or ("useproxy" not in globalconfig[pair[0]][pair[1]])
|
||||
or globalconfig[pair[0]][pair[1]]["useproxy"]
|
||||
):
|
||||
if pair is None or globalconfig[pair[0]][pair[1]].get("useproxy", True):
|
||||
return _getproxy()
|
||||
else:
|
||||
return {"https": None, "http": None}
|
||||
|
@ -88,6 +88,8 @@ class basetrans(commonbase):
|
||||
using_gpt_dict = False
|
||||
|
||||
def level2init(self):
|
||||
if self.transtype == "offline":
|
||||
globalconfig["fanyi"][self.typename]["useproxy"] = False
|
||||
self.multiapikeycurrentidx = -1
|
||||
self.queue = PriorityQueue()
|
||||
self.sqlqueue = None
|
||||
|
Loading…
x
Reference in New Issue
Block a user