fix(debrid/usenet-stream): use transformed params and dont set default start or limit

This commit is contained in:
Viren070
2025-11-26 10:12:26 +00:00
committed by GitHub
parent c1b5c3c4e7
commit d74c840a77
@@ -315,8 +315,8 @@ export class SABnzbdApi {
const tParams = { const tParams = {
mode: 'history', mode: 'history',
apikey: this.apiKey, apikey: this.apiKey,
start: params.start ?? 0, start: params.start,
limit: params.limit ?? 50, limit: params.limit,
nzo_ids: params.nzoIds ? params.nzoIds.join(',') : undefined, nzo_ids: params.nzoIds ? params.nzoIds.join(',') : undefined,
category: params.category, category: params.category,
}; };
@@ -326,7 +326,7 @@ export class SABnzbdApi {
statusCode, statusCode,
statusText, statusText,
headers, headers,
} = await this.request(params, HistoryResponseSchema, 60000); } = await this.request(tParams, HistoryResponseSchema, 60000);
const transformed = transformHistoryResponse(parsed); const transformed = transformHistoryResponse(parsed);
if (transformed.status === false || !transformed.history) { if (transformed.status === false || !transformed.history) {