This commit is contained in:
恍兮惚兮 2024-06-29 22:34:40 +08:00
parent 868250cd7b
commit 8a8174942b

View File

@ -68,7 +68,11 @@ class common:
while True:
pair = self.__tasks_searchfordata.get()
gameuid, vid = pair
if len(pair) == 2:
gameuid, vid = pair
retrytime = 5
elif len(pair) == 3:
gameuid, vid, retrytime = pair
remove = True
try:
self.__do_searchfordata(gameuid, vid)
@ -83,7 +87,11 @@ class common:
self.__safe_remove_task("searchfordatatasks", pair)
else:
self.__tasks_searchfordata.put((gameuid, vid))
if retrytime:
# 尝试5次仍不行则放弃
self.__tasks_searchfordata.put((gameuid, vid, retrytime - 1))
else:
self.__safe_remove_task("searchfordatatasks", pair)
gobject.baseobject.translation_ui.displayglobaltooltip.emit(vis)
def __tasks_downloadimg_thread(self):