mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-09 14:32:16 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1336b2136d | ||
|
|
b20e21e700 |
@@ -316,8 +316,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":
|
||||||
@@ -333,8 +335,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):
|
||||||
finish_count += 1
|
finish_count += 1
|
||||||
result = future.result()
|
result = future.result()
|
||||||
|
|||||||
Reference in New Issue
Block a user