Skip to content

Commit 302fc42

Browse files
authored
Fix invalid credentials error for qbittorrent-nox 5.2.0 version (#86)
1 parent d5a1b80 commit 302fc42

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/server/utils/qbt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export async function loginToQbt(instance: QbtInstance, timeout?: number): Promi
4747
}
4848

4949
const text = await res.text()
50-
if (text !== 'Ok.') {
50+
if (res.status !== 204 && text.trim() !== 'Ok.') {
5151
return { success: false, error: 'Invalid credentials', status: 401 }
5252
}
5353

@@ -88,7 +88,7 @@ export async function testQbtConnection(
8888
}
8989

9090
const loginText = await loginRes.text()
91-
if (loginText !== 'Ok.') {
91+
if (loginRes.status !== 204 && loginText.trim() !== 'Ok.') {
9292
return { success: false, error: 'Invalid credentials', status: 401 }
9393
}
9494

0 commit comments

Comments
 (0)