mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
v2.1.2
This commit is contained in:
@@ -387,7 +387,9 @@ def ruletest(title: str,
|
|||||||
return schemas.Response(success=False, message=f"过滤规则组 {rulegroup_name} 不存在!")
|
return schemas.Response(success=False, message=f"过滤规则组 {rulegroup_name} 不存在!")
|
||||||
|
|
||||||
# 根据标题查询媒体信息
|
# 根据标题查询媒体信息
|
||||||
media_info =SearchChain().recognize_media(MetaInfo(title=title, subtitle=subtitle))
|
media_info = SearchChain().recognize_media(MetaInfo(title=title, subtitle=subtitle))
|
||||||
|
if not media_info:
|
||||||
|
return schemas.Response(success=False, message="未识别到媒体信息!")
|
||||||
|
|
||||||
# 过滤
|
# 过滤
|
||||||
result = SearchChain().filter_torrents(rule_groups=[rulegroup.name],
|
result = SearchChain().filter_torrents(rule_groups=[rulegroup.name],
|
||||||
|
|||||||
+1
-1
@@ -564,7 +564,7 @@ class MediaChain(ChainBase, metaclass=Singleton):
|
|||||||
logger.info(f"当前刮削季为:{season_meta.begin_season},跳过文件:{image_path}")
|
logger.info(f"当前刮削季为:{season_meta.begin_season},跳过文件:{image_path}")
|
||||||
continue
|
continue
|
||||||
if not overwrite and self.storagechain.get_file_item(storage=fileitem.storage,
|
if not overwrite and self.storagechain.get_file_item(storage=fileitem.storage,
|
||||||
path=image_path):
|
path=image_path):
|
||||||
logger.info(f"已存在图片文件:{image_path}")
|
logger.info(f"已存在图片文件:{image_path}")
|
||||||
continue
|
continue
|
||||||
# 下载图片
|
# 下载图片
|
||||||
|
|||||||
@@ -392,23 +392,24 @@ class TransferChain(ChainBase):
|
|||||||
download_hash = download_file.download_hash
|
download_hash = download_file.download_hash
|
||||||
|
|
||||||
# 查询整理目标目录
|
# 查询整理目标目录
|
||||||
|
dir_info = None
|
||||||
if not target_directory:
|
if not target_directory:
|
||||||
if src_match:
|
if src_match:
|
||||||
# 按源目录匹配,以便找到更合适的目录配置
|
# 按源目录匹配,以便找到更合适的目录配置
|
||||||
dir_info = self.directoryhelper.get_dir(media=file_mediainfo,
|
dir_info = self.directoryhelper.get_dir(media=file_mediainfo,
|
||||||
storage=file_item.storage,
|
storage=file_item.storage,
|
||||||
src_path=file_path,
|
src_path=file_path,
|
||||||
target_storage=target_storage)
|
target_storage=target_storage)
|
||||||
elif target_path:
|
elif target_path:
|
||||||
# 指定目标路径,`手动整理`场景下使用,忽略源目录匹配,使用指定目录匹配
|
# 指定目标路径,`手动整理`场景下使用,忽略源目录匹配,使用指定目录匹配
|
||||||
dir_info = self.directoryhelper.get_dir(media=file_mediainfo,
|
dir_info = self.directoryhelper.get_dir(media=file_mediainfo,
|
||||||
dest_path=target_path,
|
dest_path=target_path,
|
||||||
target_storage=target_storage)
|
target_storage=target_storage)
|
||||||
else:
|
else:
|
||||||
# 未指定目标路径,根据媒体信息获取目标目录
|
# 未指定目标路径,根据媒体信息获取目标目录
|
||||||
dir_info = self.directoryhelper.get_dir(file_mediainfo,
|
dir_info = self.directoryhelper.get_dir(file_mediainfo,
|
||||||
storage=file_item.storage,
|
storage=file_item.storage,
|
||||||
target_storage=target_storage)
|
target_storage=target_storage)
|
||||||
|
|
||||||
# 执行整理
|
# 执行整理
|
||||||
transferinfo: TransferInfo = self.transfer(fileitem=file_item,
|
transferinfo: TransferInfo = self.transfer(fileitem=file_item,
|
||||||
|
|||||||
@@ -53,7 +53,9 @@ class DownloadHistory(Base):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
@db_query
|
@db_query
|
||||||
def get_by_hash(db: Session, download_hash: str):
|
def get_by_hash(db: Session, download_hash: str):
|
||||||
return db.query(DownloadHistory).filter(DownloadHistory.download_hash == download_hash).last()
|
return db.query(DownloadHistory).filter(DownloadHistory.download_hash == download_hash).order_by(
|
||||||
|
DownloadHistory.date.desc()
|
||||||
|
).first()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@db_query
|
@db_query
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class SiteUserData(Base):
|
|||||||
func.max(SiteUserData.updated_day).label('latest_update_day')
|
func.max(SiteUserData.updated_day).label('latest_update_day')
|
||||||
)
|
)
|
||||||
.group_by(SiteUserData.domain)
|
.group_by(SiteUserData.domain)
|
||||||
.filter(SiteUserData.err_msg == None)
|
.filter(SiteUserData.err_msg is None)
|
||||||
.subquery()
|
.subquery()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ class DirectoryHelper:
|
|||||||
:param include_unsorted: 包含不整理目录
|
:param include_unsorted: 包含不整理目录
|
||||||
:param storage: 源存储类型
|
:param storage: 源存储类型
|
||||||
:param target_storage: 目标存储类型
|
:param target_storage: 目标存储类型
|
||||||
:param fileitem: 文件项,使用文件路径匹配
|
|
||||||
:param src_path: 源目录,有值时直接匹配
|
:param src_path: 源目录,有值时直接匹配
|
||||||
:param dest_path: 目标目录,有值时直接匹配
|
:param dest_path: 目标目录,有值时直接匹配
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ class YemaSpider:
|
|||||||
results = res.json().get('data', []) or []
|
results = res.json().get('data', []) or []
|
||||||
for result in results:
|
for result in results:
|
||||||
category_value = result.get('categoryId')
|
category_value = result.get('categoryId')
|
||||||
if category_value in self._tv_category :
|
if category_value in self._tv_category:
|
||||||
category = MediaType.TV.value
|
category = MediaType.TV.value
|
||||||
elif category_value in self._movie_category:
|
elif category_value in self._movie_category:
|
||||||
category = MediaType.MOVIE.value
|
category = MediaType.MOVIE.value
|
||||||
|
|||||||
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
APP_VERSION = 'v2.1.1'
|
APP_VERSION = 'v2.1.2'
|
||||||
FRONTEND_VERSION = 'v2.1.1'
|
FRONTEND_VERSION = 'v2.1.2'
|
||||||
|
|||||||
Reference in New Issue
Block a user