mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 00:16:57 +08:00
fix bug
This commit is contained in:
+8
-3
@@ -1,4 +1,5 @@
|
|||||||
import pickle
|
import pickle
|
||||||
|
import traceback
|
||||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
@@ -88,10 +89,14 @@ class SearchChain(ChainBase):
|
|||||||
获取上次搜索结果
|
获取上次搜索结果
|
||||||
"""
|
"""
|
||||||
# 读取本地文件缓存
|
# 读取本地文件缓存
|
||||||
results = self.load_cache(self.__result_temp_file)
|
content = self.load_cache(self.__result_temp_file)
|
||||||
if not results:
|
if not content:
|
||||||
|
return []
|
||||||
|
try:
|
||||||
|
return pickle.loads(content)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f'加载搜索结果失败:{str(e)} - {traceback.format_exc()}')
|
||||||
return []
|
return []
|
||||||
return results
|
|
||||||
|
|
||||||
def process(self, mediainfo: MediaInfo,
|
def process(self, mediainfo: MediaInfo,
|
||||||
keyword: str = None,
|
keyword: str = None,
|
||||||
|
|||||||
Reference in New Issue
Block a user