fix(pagination): Increase Sonarr/Radarr page sizes to fetch all items
All checks were successful
Build and Push Docker Image / build (push) Successful in 20s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 53s
CI / Security audit (push) Successful in 1m12s
CI / Tests & coverage (push) Successful in 1m27s

Sonarr Activity tab has 12 pages but we only fetched ~2 items.
Added pageSize=1000 to queue API and changed history default from 10 to 100.
This ensures all downloads are available for matching to SAB/qBittorrent.
This commit is contained in:
2026-05-19 22:20:09 +01:00
parent 6c8c333c6a
commit 2469c3e3f4
2 changed files with 6 additions and 4 deletions

View File

@@ -38,9 +38,10 @@ class PollingRadarrRetriever extends ArrRetriever {
*/
async getQueue() {
try {
// Fetch with large page size to get all items (Radarr has pagination)
const response = await axios.get(`${this.url}/api/v3/queue`, {
headers: { 'X-Api-Key': this.apiKey },
params: { includeMovie: true }
params: { includeMovie: true, pageSize: 1000 }
});
return response.data;
} catch (error) {
@@ -61,7 +62,7 @@ class PollingRadarrRetriever extends ArrRetriever {
*/
async getHistory(options = {}) {
const {
pageSize = 10,
pageSize = 100,
sortKey,
sortDir,
includeMovie = true,

View File

@@ -38,9 +38,10 @@ class PollingSonarrRetriever extends ArrRetriever {
*/
async getQueue() {
try {
// Fetch with large page size to get all items (Sonarr has pagination)
const response = await axios.get(`${this.url}/api/v3/queue`, {
headers: { 'X-Api-Key': this.apiKey },
params: { includeSeries: true, includeEpisode: true }
params: { includeSeries: true, includeEpisode: true, pageSize: 1000 }
});
return response.data;
} catch (error) {
@@ -62,7 +63,7 @@ class PollingSonarrRetriever extends ArrRetriever {
*/
async getHistory(options = {}) {
const {
pageSize = 10,
pageSize = 100,
sortKey,
sortDir,
includeSeries = true,