Skip to content

Commit

Permalink
fix: 高级搜索tmdb报错
Browse files Browse the repository at this point in the history
  • Loading branch information
linyuan0213 committed Jul 11, 2024
1 parent 9b7d31a commit 7d25fb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/indexer/client/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def filter_search_results(self, result_array: list,
index_rule_fail += 1
continue
# 识别种子名称
meta_info = MetaInfo(title=torrent_name, subtitle=f"{labels} {description}", tmdb_id=match_media.tmdb_id)
meta_info = MetaInfo(title=torrent_name, subtitle=f"{labels} {description}", tmdb_id=match_media.tmdb_id if match_media else None)
if not meta_info.get_name():
log.info(f"【{self.client_name}{torrent_name} 无法识别到名称")
index_match_fail += 1
Expand Down
6 changes: 3 additions & 3 deletions app/indexer/indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ def search_by_keyword(self,
ret_array = ret_array + result
# 计算耗时
end_time = datetime.datetime.now()
log.info(f"【{self._client_type.value}】所有站点搜索完成,有效资源数:%s,总耗时 %s 秒"
log.info(f"【{self._client_type.value}搜索关键词 {key_word} 所有站点搜索完成,有效资源数:%s,总耗时 %s 秒"
% (len(ret_array), (end_time - start_time).seconds))
self.progress.update(ptype=ProgressKey.Search,
text="所有站点搜索完成,有效资源数:%s,总耗时 %s 秒"
% (len(ret_array), (end_time - start_time).seconds),
text="搜索关键词 %s 所有站点搜索完成,有效资源数:%s,总耗时 %s 秒"
% (key_word, len(ret_array), (end_time - start_time).seconds),
value=100)
return ret_array

Expand Down

0 comments on commit 7d25fb3

Please sign in to comment.