From 4de5a5e7afaf1f6c06b0a30f78e66cc4d829d6f8 Mon Sep 17 00:00:00 2001 From: thsrite Date: Wed, 9 Aug 2023 08:29:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix=20=E5=BC=80=E5=A7=8B=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E7=A7=8D=E5=AD=90=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chain/download.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/chain/download.py b/app/chain/download.py index 7785eabf..eb863709 100644 --- a/app/chain/download.py +++ b/app/chain/download.py @@ -36,7 +36,7 @@ class DownloadChain(ChainBase): if meta.resource_term: msg_text = f"{msg_text}\n质量:{meta.resource_term}" if torrent.size: - if str(torrent.size).isdigit(): + if str(torrent.size).replace(".", "").isdigit(): size = StringUtils.str_filesize(torrent.size) else: size = torrent.size From 43ed54717ea91a35752505609ffd4a9c912ea663 Mon Sep 17 00:00:00 2001 From: thsrite Date: Wed, 9 Aug 2023 08:38:28 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix=20=E8=87=AA=E5=8A=A8=E5=88=A0=E7=A7=8D?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF=E5=85=B3?= =?UTF-8?q?=E9=94=AE=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/plugins/torrentremover/__init__.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/app/plugins/torrentremover/__init__.py b/app/plugins/torrentremover/__init__.py index ed92a9cf..d312f7da 100644 --- a/app/plugins/torrentremover/__init__.py +++ b/app/plugins/torrentremover/__init__.py @@ -367,6 +367,22 @@ class TorrentRemover(_PluginBase): } ] }, + { + 'component': 'VCol', + 'props': { + 'cols': 6 + }, + 'content': [ + { + 'component': 'VTextField', + 'props': { + 'model': 'errorkeywords', + 'label': '错误信息关键词', + 'placeholder': '支持正式表达式' + } + } + ] + }, { 'component': 'VCol', 'props': { @@ -457,7 +473,7 @@ class TorrentRemover(_PluginBase): ] } ], { - "enable": False, + "enabled": False, "notify": False, "onlyonce": False, "action": 'pause', From 61890cb388ebc726836e809739818be86acbb8f2 Mon Sep 17 00:00:00 2001 From: thsrite Date: Wed, 9 Aug 2023 09:04:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix=20=E4=B8=8B=E8=BD=BD=E5=AD=97=E5=B9=95?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=88=9B=E5=BB=BA=E7=9B=AE=E5=BD=95=EF=BC=88?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E5=99=A8=E5=BC=80=E5=90=AF=E4=B8=B4=E6=97=B6?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E7=9A=84=E6=83=85=E5=86=B5=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/modules/subtitle/__init__.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/modules/subtitle/__init__.py b/app/modules/subtitle/__init__.py index 19a4fd03..81f35b6b 100644 --- a/app/modules/subtitle/__init__.py +++ b/app/modules/subtitle/__init__.py @@ -57,10 +57,10 @@ class SubtitleModule(_ModuleBase): if download_dir.exists(): break time.sleep(1) - # 不是目录说明是单文件种子,直接使用下载目录 + # 目录不存在则创建目录 if not download_dir.exists(): - logger.error(f"字幕下载位置不存在:{download_dir}") - return + download_dir.mkdir(parents=True, exist_ok=True) + # 不是目录说明是单文件种子,直接使用下载目录 if download_dir.is_file(): download_dir = download_dir.parent # 读取网站代码 @@ -91,9 +91,6 @@ class SubtitleModule(_ModuleBase): # 下载 ret = request.get_res(sublink) if ret and ret.status_code == 200: - # 创建目录 - if not download_dir.exists(): - download_dir.mkdir(parents=True, exist_ok=True) # 保存ZIP file_name = TorrentHelper.get_url_filename(ret, sublink) if not file_name: