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 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: 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',