From 22b1ebe1cf31f0a0152523938495859563c1d0ad Mon Sep 17 00:00:00 2001 From: jxxghp Date: Wed, 15 Jan 2025 08:14:39 +0800 Subject: [PATCH] fix #3724 --- app/chain/subscribe.py | 2 -- app/helper/torrent.py | 5 +++-- app/schemas/transfer.py | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/chain/subscribe.py b/app/chain/subscribe.py index a3b5dbc4..2461a43d 100644 --- a/app/chain/subscribe.py +++ b/app/chain/subscribe.py @@ -584,8 +584,6 @@ class SubscribeChain(ChainBase, metaclass=Singleton): # 重新识别元数据 torrent_meta = MetaInfo(title=torrent_info.title, subtitle=torrent_info.description, custom_words=custom_words_list) - # 更新识别元数据缓存 - context.meta_info = torrent_meta # 媒体信息需要重新识别 torrent_mediainfo = None diff --git a/app/helper/torrent.py b/app/helper/torrent.py index 54e7fa9a..102e669a 100644 --- a/app/helper/torrent.py +++ b/app/helper/torrent.py @@ -9,7 +9,8 @@ from torrentool.api import Torrent from app.core.config import settings from app.core.context import Context, TorrentInfo, MediaInfo -from app.core.metainfo import MetaBase, MetaInfo +from app.core.meta import MetaBase +from app.core.metainfo import MetaInfo from app.db.site_oper import SiteOper from app.db.systemconfig_oper import SystemConfigOper from app.log import logger @@ -477,6 +478,6 @@ class TorrentHelper(metaclass=Singleton): and not set(torrent_episodes).intersection(set(need_episodes)): # 单季集没有交集的不要 logger.debug(f"种子 {torrent.site_name} - {torrent.title} " - f"集 {torrent_episodes} 没有需要的集:{need_episodes}") + f"集 {torrent_episodes} 没有需要的集:{need_episodes}") return False return True diff --git a/app/schemas/transfer.py b/app/schemas/transfer.py index b65ebb8f..d4a8730d 100644 --- a/app/schemas/transfer.py +++ b/app/schemas/transfer.py @@ -48,9 +48,9 @@ class TransferTask(BaseModel): """ 文件整理任务 """ - fileitem: Optional[FileItem] = None - meta: Optional[MetaInfo] = None - mediainfo: Optional[MediaInfo] = None + fileitem: FileItem + meta: Optional[Any] = None + mediainfo: Optional[Any] = None target_directory: Optional[TransferDirectoryConf] = None target_storage: Optional[str] = None target_path: Optional[Path] = None