Use 500 as limit to prevent timeouts
This commit is contained in:
@@ -109,14 +109,14 @@ func (rd *RealDebrid) UnrestrictLink(link string, checkFirstByte bool) (*Downloa
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetTorrents returns all torrents, paginated
|
// 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) {
|
func (rd *RealDebrid) GetTorrents(customLimit int, active bool) ([]Torrent, int, error) {
|
||||||
baseURL := "https://api.real-debrid.com/rest/1.0/torrents"
|
baseURL := "https://api.real-debrid.com/rest/1.0/torrents"
|
||||||
var allTorrents []Torrent
|
var allTorrents []Torrent
|
||||||
page := 1
|
page := 1
|
||||||
limit := customLimit
|
limit := customLimit
|
||||||
if limit == 0 {
|
if limit == 0 {
|
||||||
limit = 1000
|
limit = 500
|
||||||
}
|
}
|
||||||
totalCount := 0
|
totalCount := 0
|
||||||
|
|
||||||
@@ -322,7 +322,7 @@ func (rd *RealDebrid) GetActiveTorrentCount() (*ActiveTorrentCountResponse, erro
|
|||||||
func (rd *RealDebrid) GetDownloads(page, offset int) ([]Download, int, error) {
|
func (rd *RealDebrid) GetDownloads(page, offset int) ([]Download, int, error) {
|
||||||
baseURL := "https://api.real-debrid.com/rest/1.0/downloads"
|
baseURL := "https://api.real-debrid.com/rest/1.0/downloads"
|
||||||
var allDownloads []Download
|
var allDownloads []Download
|
||||||
limit := 1000
|
limit := 500
|
||||||
totalCount := 0
|
totalCount := 0
|
||||||
|
|
||||||
params := url.Values{}
|
params := url.Values{}
|
||||||
|
|||||||
Reference in New Issue
Block a user