Merge pull request #2975 from thsrite/v2

This commit is contained in:
jxxghp
2024-10-30 16:56:57 +08:00
committed by GitHub
2 changed files with 5 additions and 0 deletions

View File

@@ -145,6 +145,8 @@ class ConfigModel(BaseModel):
SUBSCRIBE_STATISTIC_SHARE: bool = True
# 订阅搜索开关
SUBSCRIBE_SEARCH: bool = False
# 检查本地媒体库是否存在资源开关
LOCAL_EXISTS_SEARCH: bool = False
# 搜索多个名称
SEARCH_MULTIPLE_NAME: bool = False
# 站点数据刷新间隔(小时)

View File

@@ -1173,6 +1173,9 @@ class FileManagerModule(_ModuleBase):
:param mediainfo: 识别的媒体信息
:return: 如不存在返回None存在时返回信息包括每季已存在所有集{type: movie/tv, seasons: {season: [episodes]}}
"""
if not settings.LOCAL_EXISTS_SEARCH:
return None
# 检查媒体库
fileitems = self.media_files(mediainfo)
if not fileitems: