From 09260063ae5a4e9099ef812774e1794567b18994 Mon Sep 17 00:00:00 2001 From: ajnart <49837342+ajnart@users.noreply.github.com> Date: Sat, 11 Jul 2026 20:02:29 +0200 Subject: [PATCH] fix(qbittorrent): sort torrents by progress so active items appear before limit cutoff The qBittorrent integration was passing only { limit } to listTorrents(), which returns completed torrents first by default. With a 50-item limit and large completed torrent libraries, active/incomplete torrents never appeared in the response. The widget's client-side showCompletedTorrent filter then had nothing to display. Adding sort: 'progress' (ascending) ensures incomplete/active torrents always appear first, even with a low limit. Closes report: https://www.answeroverflow.com/m/1525039765940863046 --- .../src/download-client/qbittorrent/qbittorrent-integration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integrations/src/download-client/qbittorrent/qbittorrent-integration.ts b/packages/integrations/src/download-client/qbittorrent/qbittorrent-integration.ts index c08dd5848..edc071889 100644 --- a/packages/integrations/src/download-client/qbittorrent/qbittorrent-integration.ts +++ b/packages/integrations/src/download-client/qbittorrent/qbittorrent-integration.ts @@ -30,7 +30,7 @@ export class QBitTorrentIntegration extends Integration implements IDownloadClie public async getClientJobsAndStatusAsync(input: { limit: number }): Promise { const type = "torrent"; const client = await this.getClientAsync(); - const torrents = await client.listTorrents({ limit: input.limit }); + const torrents = await client.listTorrents({ limit: input.limit, sort: "progress", reverse: false }); const rates = torrents.reduce( ({ down, up }, { dlspeed, upspeed }) => ({ down: down + dlspeed, up: up + upspeed }), { down: 0, up: 0 },