Merge pull request #4339 from jtcymc/v2

This commit is contained in:
jxxghp
2025-05-25 08:01:00 +08:00
committed by GitHub
+3 -3
View File
@@ -329,8 +329,10 @@ class SearchChain(ChainBase):
self.progress.update(value=0, self.progress.update(value=0,
text=f"开始搜索,共 {total_num} 个站点 ...", text=f"开始搜索,共 {total_num} 个站点 ...",
key=ProgressKey.Search) key=ProgressKey.Search)
# 结果集
results = []
# 多线程 # 多线程
executor = ThreadPoolExecutor(max_workers=len(indexer_sites)) with ThreadPoolExecutor(max_workers=len(indexer_sites)) as executor:
all_task = [] all_task = []
for site in indexer_sites: for site in indexer_sites:
if area == "imdbid": if area == "imdbid":
@@ -346,8 +348,6 @@ class SearchChain(ChainBase):
mtype=mediainfo.type if mediainfo else None, mtype=mediainfo.type if mediainfo else None,
page=page) page=page)
all_task.append(task) all_task.append(task)
# 结果集
results = []
for future in as_completed(all_task): for future in as_completed(all_task):
if global_vars.is_system_stopped: if global_vars.is_system_stopped:
break break