From f59e10ae1d3991c482d529319bbb4498ddc01fe7 Mon Sep 17 00:00:00 2001 From: thsrite Date: Sat, 28 Oct 2023 12:24:24 +0800 Subject: [PATCH] =?UTF-8?q?fix=20qb=E6=8C=89=E9=A1=BA=E5=BA=8F=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=94=AF=E6=8C=81=E5=8F=98=E9=87=8F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + app/core/config.py | 2 ++ app/modules/qbittorrent/qbittorrent.py | 2 +- config/app.env | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f4ec6c44..32f47f9e 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ MoviePilot需要配套下载器和媒体服务器配合使用。 - **QB_USER:** qbittorrent用户名 - **QB_PASSWORD:** qbittorrent密码 - **QB_CATEGORY:** qbittorrent分类自动管理,`true`/`false`,默认`false`,开启后会将下载二级分类传递到下载器,由下载器管理下载目录,需要同步开启`DOWNLOAD_CATEGORY` + - **QB_SEQUENTIAL:** qbittorrent按顺序下载,`true`/`false`,默认`true` - `transmission`设置项: diff --git a/app/core/config.py b/app/core/config.py index 942df272..6131e626 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -129,6 +129,8 @@ class Settings(BaseSettings): QB_PASSWORD: str = None # Qbittorrent分类自动管理 QB_CATEGORY: bool = False + # Qbittorrent按顺序下载 + QB_SEQUENTIAL: bool = True # Transmission地址,IP:PORT TR_HOST: str = None # Transmission用户名 diff --git a/app/modules/qbittorrent/qbittorrent.py b/app/modules/qbittorrent/qbittorrent.py index a3a5ec42..b0acaf14 100644 --- a/app/modules/qbittorrent/qbittorrent.py +++ b/app/modules/qbittorrent/qbittorrent.py @@ -243,7 +243,7 @@ class Qbittorrent(metaclass=Singleton): is_paused=is_paused, tags=tags, use_auto_torrent_management=is_auto, - is_sequential_download=True, + is_sequential_download=settings.QB_SEQUENTIAL, cookie=cookie, category=category, **kwargs) diff --git a/config/app.env b/config/app.env index 1116b08a..ffb01a14 100644 --- a/config/app.env +++ b/config/app.env @@ -141,6 +141,8 @@ QB_USER= QB_PASSWORD= # Qbittorrent分类自动管理 QB_CATEGORY=false +# Qbittorrent按顺序下载 +QB_SEQUENTIAL=true # Transmission地址,IP:PORT TR_HOST= # Transmission用户名