This commit is contained in:
恍兮惚兮 2024-07-30 21:14:05 +08:00
parent eb75096b51
commit 85d6aa0ba3
2 changed files with 3 additions and 5 deletions

View File

@ -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}

View File

@ -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