fix tests
This commit is contained in:
@ -53,6 +53,8 @@ class Settings(BaseSettings):
|
||||
RMT_AUDIO_TRACK_EXT: list = ['.mka']
|
||||
# 索引器
|
||||
INDEXER: str = "builtin"
|
||||
# 索引站点,站点域名关键字使用,分隔
|
||||
INDEXER_SITES: str = ""
|
||||
# 消息通知渠道 telegram/wechat
|
||||
MESSAGER: str = "telegram"
|
||||
# WeChat企业ID
|
||||
|
@ -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):
|
||||
|
Reference in New Issue
Block a user