From b4b75754d5b633b197288ff22ebc7c0ccbc0d534 Mon Sep 17 00:00:00 2001 From: bobokun Date: Sat, 24 Jun 2023 09:52:21 -0400 Subject: [PATCH] increase qbitorrent api timeout (fixes #343) --- VERSION | 2 +- modules/qbittorrent.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 1d5655a..821ac8e 100755 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.0.2-develop3 +4.0.2-develop4 diff --git a/modules/qbittorrent.py b/modules/qbittorrent.py index e8394f5..35f4806 100755 --- a/modules/qbittorrent.py +++ b/modules/qbittorrent.py @@ -36,7 +36,13 @@ class Qbt: logger.debug(f"Host: {self.host}, Username: {self.username}, Password: {self.password}") ex = "" try: - self.client = Client(host=self.host, username=self.username, password=self.password, VERIFY_WEBUI_CERTIFICATE=False) + self.client = Client( + host=self.host, + username=self.username, + password=self.password, + VERIFY_WEBUI_CERTIFICATE=False, + REQUESTS_ARGS={"timeout": (30, 30)}, + ) self.client.auth_log_in() self.current_version = self.client.app.version logger.debug(f"qBittorrent: {self.current_version}")