From f1aaba3d70641153858472c7ebcd0d9e76951048 Mon Sep 17 00:00:00 2001 From: thsrite Date: Wed, 20 Mar 2024 11:53:16 +0800 Subject: [PATCH] fix --- README.md | 2 +- docs/CloudLinkMonitor.md | 1 + package.json | 2 +- plugins/cloudlinkmonitor/__init__.py | 21 +++++++++------------ 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 90bc80a..3371df3 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ MoviePilot三方插件市场:https://github.com/thsrite/MoviePilot-Plugins/ - [Emby观影报告 1.5](docs%2FEmbyReporter.md) - [豆瓣明星热映订阅 1.3](docs%2FActorSubscribe.md) - [短剧刮削 3.1](docs%2FShortPlayMonitor.md) -- [云盘实时链接 1.2](docs%2FCloudLinkMonitor.md) +- [云盘实时链接 1.4](docs%2FCloudLinkMonitor.md) - [源文件恢复 1.2](docs%2FLinkToSrc.md) - [微信消息转发 1.0](docs%2FWeChatForward.md) - [订阅下载统计 1.4](docs%2FSubscribeStatistic.md) diff --git a/docs/CloudLinkMonitor.md b/docs/CloudLinkMonitor.md index 6b36de9..0036814 100644 --- a/docs/CloudLinkMonitor.md +++ b/docs/CloudLinkMonitor.md @@ -2,6 +2,7 @@ ### 更新记录 +- 1.4 fix - 1.2 fix bug - 1.1 自动转移链接(不刮削) - 1.0 监控云盘目录文件变化,按原文件名软连接 diff --git a/package.json b/package.json index 811c413..d194e7f 100644 --- a/package.json +++ b/package.json @@ -122,7 +122,7 @@ "CloudLinkMonitor": { "name": "云盘实时链接", "description": "监控云盘目录文件变化,自动转移链接(不刮削)。", - "version": "1.3", + "version": "1.4", "icon": "Linkease_A.png", "author": "thsrite", "level": 1 diff --git a/plugins/cloudlinkmonitor/__init__.py b/plugins/cloudlinkmonitor/__init__.py index 6d13435..7460387 100644 --- a/plugins/cloudlinkmonitor/__init__.py +++ b/plugins/cloudlinkmonitor/__init__.py @@ -23,7 +23,6 @@ from app.core.metainfo import MetaInfoPath from app.db.downloadhistory_oper import DownloadHistoryOper from app.db.transferhistory_oper import TransferHistoryOper from app.log import logger -from app.modules.filetransfer import FileTransferModule from app.plugins import _PluginBase from app.schemas import Notification, NotificationType, TransferInfo from app.schemas.types import EventType, MediaType, SystemConfigKey @@ -56,11 +55,11 @@ class CloudLinkMonitor(_PluginBase): # 插件名称 plugin_name = "云盘实时链接" # 插件描述 - plugin_desc = "监控云盘目录文件变化,自动转移链接(不刮削不生成目的二级目录)。" + plugin_desc = "监控云盘目录文件变化,自动转移链接(不刮削)。" # 插件图标 plugin_icon = "Linkease_A.png" # 插件版本 - plugin_version = "1.3" + plugin_version = "1.4" # 插件作者 plugin_author = "thsrite" # 作者主页 @@ -83,7 +82,6 @@ class CloudLinkMonitor(_PluginBase): _notify = False _onlyonce = False _cron = None - filetransfer = None _size = 0 # 模式 compatibility/fast _mode = "compatibility" @@ -105,7 +103,6 @@ class CloudLinkMonitor(_PluginBase): self.downloadhis = DownloadHistoryOper() self.transferchian = TransferChain() self.tmdbchain = TmdbChain() - self.filetransfer = FileTransferModule() # 清空配置 self._dirconf = {} self._transferconf = {} @@ -394,12 +391,12 @@ class CloudLinkMonitor(_PluginBase): episodes_info = None # 转移 - transferinfo: TransferInfo = self.filetransfer.transfer_media(in_path=file_path, - in_meta=file_meta, - mediainfo=mediainfo, - transfer_type=transfer_type, - target_dir=target, - episodes_info=episodes_info) + transferinfo: TransferInfo = self.chain.transfer(mediainfo=mediainfo, + path=file_path, + transfer_type=transfer_type, + target=target, + meta=file_meta, + episodes_info=episodes_info) if not transferinfo: logger.error("文件转移模块运行失败") return @@ -856,7 +853,7 @@ class CloudLinkMonitor(_PluginBase): 'props': { 'type': 'info', 'variant': 'tonal', - 'text': '目的目录不自动配置二级分类目录。' + 'text': '监控目录不指定目的目录时,将转移到媒体库目录,并自动创建一级分类目录,同时按配置创建二级分类目录;监控目录指定了目的目录时,不会自动创建一级目录,但会根据配置创建二级分类目录。' } } ]