fix(qbittorrent): handle v5 stopped torrent states for pause functionality (#6211)

This commit is contained in:
Thomas authored and GitHub committed 2026-07-10 16:55:20 +02:00
1 parent af89423f66
commit 2ada1aa249
4 files changed
+35 -9

No files matched your search

@@ -99,11 +99,14 @@ export class QBitTorrentIntegration extends Integration implements IDownloadClie
password: this.getSecretValue("password"),
};
return new QBittorrent({
const client = new QBittorrent({
...credentials,
baseUrl: this.url("/").toString(),
dispatcher: dispatcher ?? (await createCertificateAgentAsync()),
});
// Populate version state so the library uses correct v5 endpoints (stop/start vs pause/resume)
await client.getAppVersion();
return client;
}
private static getTorrentState(state: string): DownloadClientItem["state"] {
@@ -125,6 +128,8 @@ export class QBitTorrentIntegration extends Integration implements IDownloadClie
return "seeding";
case "pausedDL":
case "pausedUP":
case "stoppedDL":
case "stoppedUP":
return "paused";
case "stalledDL":
return "stalled";