From 40cf80406ef9460fb5fe1da01a1e8c8e671453df Mon Sep 17 00:00:00 2001 From: thsrite Date: Sun, 20 Aug 2023 18:37:04 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=95=B0=E6=8D=AE=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E8=BF=98=E5=8E=9F=E5=90=8C=E6=AD=A5=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/plugins/nastoolsync/__init__.py | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/app/plugins/nastoolsync/__init__.py b/app/plugins/nastoolsync/__init__.py index 9e7f99e1..8ecbfbef 100644 --- a/app/plugins/nastoolsync/__init__.py +++ b/app/plugins/nastoolsync/__init__.py @@ -46,6 +46,7 @@ class NAStoolSync(_PluginBase): _site = None _downloader = None _supp = False + _transfer = False qb = None tr = None @@ -61,8 +62,9 @@ class NAStoolSync(_PluginBase): self._site = config.get("site") self._downloader = config.get("downloader") self._supp = config.get("supp") + self._transfer = config.get("transfer") - if self._nt_db_path: + if self._nt_db_path and self._transfer: self.qb = Qbittorrent() self.tr = Transmission() @@ -92,12 +94,13 @@ class NAStoolSync(_PluginBase): self.update_config( { + "transfer": False, "clear": False, "nt_db_path": "", "path": self._path, "downloader": self._downloader, "site": self._site, - "supp": self._supp + "supp": self._supp, } ) @@ -527,7 +530,23 @@ class NAStoolSync(_PluginBase): 'component': 'VCol', 'props': { 'cols': 12, - 'md': 6 + 'md': 4 + }, + 'content': [ + { + 'component': 'VSwitch', + 'props': { + 'model': 'transfer', + 'label': '同步记录' + } + } + ] + }, + { + 'component': 'VCol', + 'props': { + 'cols': 12, + 'md': 4 }, 'content': [ { @@ -543,7 +562,7 @@ class NAStoolSync(_PluginBase): 'component': 'VCol', 'props': { 'cols': 12, - 'md': 6 + 'md': 4 }, 'content': [ { @@ -667,6 +686,7 @@ class NAStoolSync(_PluginBase): ] } ], { + "transfer": False, "clear": False, "supp": False, "nt_db_path": "",