Skip to content

Commit 05d23b3

Browse files
author
Simple-Tracker
committed
Login fix (qBittorrent-5.2.0rc1)
1 parent 1c553c6 commit 05d23b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

client_qBittorrent.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,14 @@ func qB_Login() bool {
157157
loginParams := url.Values{}
158158
loginParams.Set("username", config.ClientUsername)
159159
loginParams.Set("password", config.ClientPassword)
160-
_, _, loginResponseBody := Submit(config.ClientURL+"/v2/auth/login", loginParams.Encode(), false, true, nil)
160+
loginResponseCode, _, loginResponseBody := Submit(config.ClientURL+"/v2/auth/login", loginParams.Encode(), false, true, nil)
161161
if loginResponseBody == nil {
162162
Log("Login", GetLangText("Error-Login"), true)
163163
return false
164164
}
165165

166166
loginResponseBodyStr := StrTrim(string(loginResponseBody))
167-
if loginResponseBodyStr == "Ok." {
167+
if loginResponseCode == 204 || loginResponseBodyStr == "Ok." {
168168
Log("Login", GetLangText("Success-Login"), true)
169169
return true
170170
} else if loginResponseBodyStr == "Fails." {

0 commit comments

Comments
 (0)