This commit is contained in:
jxxghp
2023-08-30 23:59:27 +08:00
parent 854fafd880
commit f0666986f0
4 changed files with 41 additions and 24 deletions

View File

@@ -16,9 +16,10 @@ from app.core.context import MediaInfo, TorrentInfo
from app.core.event import EventManager
from app.core.meta import MetaBase
from app.core.module import ModuleManager
from app.helper.format import FormatParser
from app.log import logger
from app.schemas import TransferInfo, TransferTorrent, ExistMediaInfo, DownloadingTorrent, CommingMessage, Notification, \
WebhookEventInfo, EpisodeFormat
WebhookEventInfo
from app.schemas.types import TorrentStatus, MediaType, MediaImageType, EventType
from app.utils.object import ObjectUtils
@@ -274,7 +275,7 @@ class ChainBase(metaclass=ABCMeta):
def transfer(self, path: Path, meta: MetaBase, mediainfo: MediaInfo,
transfer_type: str,
target: Path = None,
epformat: EpisodeFormat = None) -> Optional[TransferInfo]:
formater: FormatParser = None) -> Optional[TransferInfo]:
"""
文件转移
:param path: 文件路径
@@ -282,12 +283,12 @@ class ChainBase(metaclass=ABCMeta):
:param mediainfo: 识别的媒体信息
:param transfer_type: 转移模式
:param target: 转移目标路径
:param epformat: 自定义剧集识别格式
:param formater: 自定义剧集识别格式
:return: {path, target_path, message}
"""
return self.run_module("transfer", path=path, meta=meta, mediainfo=mediainfo,
transfer_type=transfer_type, target=target,
epformat=epformat)
formater=formater)
def transfer_completed(self, hashs: Union[str, list], path: Path = None) -> None:
"""