From 2da715f694b3eb05721bb207a6657c449fc3fd41 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Sun, 11 Feb 2024 11:43:19 +0100 Subject: [PATCH] Use 500 as limit to prevent timeouts --- pkg/realdebrid/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/realdebrid/api.go b/pkg/realdebrid/api.go index 88ae8d3..6105536 100644 --- a/pkg/realdebrid/api.go +++ b/pkg/realdebrid/api.go @@ -109,14 +109,14 @@ func (rd *RealDebrid) UnrestrictLink(link string, checkFirstByte bool) (*Downloa } // GetTorrents returns all torrents, paginated -// if customLimit is 0, the default limit of 1000 is used +// if customLimit is 0, the default limit of 500 is used func (rd *RealDebrid) GetTorrents(customLimit int, active bool) ([]Torrent, int, error) { baseURL := "https://api.real-debrid.com/rest/1.0/torrents" var allTorrents []Torrent page := 1 limit := customLimit if limit == 0 { - limit = 1000 + limit = 500 } totalCount := 0 @@ -322,7 +322,7 @@ func (rd *RealDebrid) GetActiveTorrentCount() (*ActiveTorrentCountResponse, erro func (rd *RealDebrid) GetDownloads(page, offset int) ([]Download, int, error) { baseURL := "https://api.real-debrid.com/rest/1.0/downloads" var allDownloads []Download - limit := 1000 + limit := 500 totalCount := 0 params := url.Values{}