feat:下载器支持多选

This commit is contained in:
jxxghp
2024-03-09 18:25:04 +08:00
parent 15bdb694cc
commit 8b4495c857
5 changed files with 36 additions and 4 deletions

View File

@ -73,8 +73,12 @@ class QbittorrentModule(_ModuleBase):
logger.error(f"获取种子名称失败:{e}")
return "", 0
# 不是默认下载器不处理
if settings.DEFAULT_DOWNLOADER != "qbittorrent":
return None
if not content:
return
return None
if isinstance(content, Path) and not content.exists():
return None, f"种子文件不存在:{content}"

View File

@ -73,8 +73,12 @@ class TransmissionModule(_ModuleBase):
logger.error(f"获取种子名称失败:{e}")
return "", 0
# 不是默认下载器不处理
if settings.DEFAULT_DOWNLOADER != "transmission":
return None
if not content:
return
return None
if isinstance(content, Path) and not content.exists():
return None, f"种子文件不存在:{content}"