fix tests

This commit is contained in:
jxxghp
2023-06-07 23:09:36 +08:00
parent 506fd7427f
commit 4a04f4d7cb
8 changed files with 43 additions and 9 deletions

View File

@ -5,7 +5,7 @@ from typing import List, Optional, Tuple, Union
from ruamel.yaml import CommentedMap
from app.core import MediaInfo, TorrentInfo
from app.core import MediaInfo, TorrentInfo, settings
from app.log import logger
from app.modules import _ModuleBase
from app.modules.indexer.spider import TorrentSpider
@ -74,6 +74,10 @@ class IndexerModule(_ModuleBase):
else:
search_word = None
# 未开启的站点不搜索
if settings.INDEXER_SITES and not any([s in site.get("domain") for s in settings.INDEXER_SITES.split(',')]):
return []
if search_word \
and site.get('language') == "en" \
and StringUtils.is_chinese(search_word):