Skip to content

Commit 9088e06

Browse files
authored
Fix: New login status code check for qBittorrent 5.2
Fix broken login on qBittorrent 5.2+ caused by changes in the API response, in a backward-compatible way.
1 parent c55b43c commit 9088e06

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

autoremovetorrents/client/qbittorrent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def login(self, username, password):
142142
except Exception as exc:
143143
raise ConnectionFailure(str(exc))
144144

145-
if request.status_code == 200:
145+
if 200 <= request.status_code < 300:
146146
if request.text == 'Fails.': # Fail
147147
raise LoginFailure(request.text)
148148
else:

0 commit comments

Comments
 (0)