From c85b70d4adc39306a57f0ee10e5b4bd573df44a6 Mon Sep 17 00:00:00 2001 From: thsrite Date: Tue, 12 Nov 2024 09:24:34 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=BC=80=E5=90=AF=E4=BA=8C=E7=BA=A7=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.v2.json | 3 ++- plugins.v2/cloudlinkmonitor/__init__.py | 30 ++++++++++++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/package.v2.json b/package.v2.json index f09ba33..5174025 100644 --- a/package.v2.json +++ b/package.v2.json @@ -365,11 +365,12 @@ "name": "目录实时监控", "description": "监控云盘目录文件变化,自动转移媒体文件。", "labels": "云盘,工具", - "version": "2.5.2", + "version": "2.5.3", "icon": "Linkease_A.png", "author": "thsrite", "level": 1, "history": { + "v2.5.3": "支持自定义开启二级分类", "v2.5.2": "支持联动[云盘Strm]相关插件", "v2.5.1": "修复媒体刮削", "v2.5": "兼容v2", diff --git a/plugins.v2/cloudlinkmonitor/__init__.py b/plugins.v2/cloudlinkmonitor/__init__.py index ccc5aa1..d4e67cc 100644 --- a/plugins.v2/cloudlinkmonitor/__init__.py +++ b/plugins.v2/cloudlinkmonitor/__init__.py @@ -62,7 +62,7 @@ class CloudLinkMonitor(_PluginBase): # 插件图标 plugin_icon = "Linkease_A.png" # 插件版本 - plugin_version = "2.5.2" + plugin_version = "2.5.3" # 插件作者 plugin_author = "thsrite" # 作者主页 @@ -87,6 +87,7 @@ class CloudLinkMonitor(_PluginBase): _onlyonce = False _history = False _scrape = False + _category = False _refresh = False _softlink = False _strm = False @@ -128,6 +129,7 @@ class CloudLinkMonitor(_PluginBase): self._onlyonce = config.get("onlyonce") self._history = config.get("history") self._scrape = config.get("scrape") + self._category = config.get("category") self._refresh = config.get("refresh") self._mode = config.get("mode") self._transfer_type = config.get("transfer_type") @@ -259,6 +261,7 @@ class CloudLinkMonitor(_PluginBase): "softlink": self._softlink, "strm": self._strm, "scrape": self._scrape, + "category": self._category, "size": self._size, "refresh": self._refresh, }) @@ -429,7 +432,7 @@ class CloudLinkMonitor(_PluginBase): target_dir.notify = False target_dir.overwrite_mode = "never" target_dir.library_storage = "local" - target_dir.library_category_folder = True + target_dir.library_category_folder = self._category # 转移文件 transferinfo: TransferInfo = self.chain.transfer(fileitem=file_item, meta=file_meta, @@ -802,9 +805,9 @@ class CloudLinkMonitor(_PluginBase): { 'component': 'VSwitch', 'props': { - 'model': 'refresh', - 'label': '刷新媒体库', - }, + 'model': 'category', + 'label': '是否二级分类', + } } ] }, @@ -818,6 +821,22 @@ class CloudLinkMonitor(_PluginBase): { 'component': 'VRow', 'content': [ + { + 'component': 'VCol', + 'props': { + 'cols': 12, + 'md': 4 + }, + 'content': [ + { + 'component': 'VSwitch', + 'props': { + 'model': 'refresh', + 'label': '刷新媒体库', + }, + } + ] + }, { 'component': 'VCol', 'props': { @@ -1016,6 +1035,7 @@ class CloudLinkMonitor(_PluginBase): "onlyonce": False, "history": False, "scrape": False, + "category": False, "refresh": True, "softlink": False, "strm": False,