Add cleanup job for downloaded ids

This commit is contained in:
Ben Adrian Sarmiento
2024-06-05 09:46:54 +02:00
parent aa11889601
commit c62cdeace8
2 changed files with 16 additions and 2 deletions

View File

@@ -174,7 +174,7 @@ func (rd *RealDebrid) GetTorrents(onlyOne bool) ([]Torrent, int, error) {
page := 1
// compute ceiling of totalCount / limit
maxPages := (totalCount + rd.cfg.GetTorrentsCount() - 1) / rd.cfg.GetTorrentsCount()
rd.log.Debugf("Torrents total count is %d, total page count is %d", totalCount, maxPages)
rd.log.Debugf("Torrents total count is %d", totalCount)
maxParallelThreads := 4
if maxPages < maxParallelThreads {
maxParallelThreads = maxPages
@@ -370,7 +370,7 @@ func (rd *RealDebrid) GetDownloads() []Download {
// compute ceiling of totalCount / limit
maxPages := (totalCount + limit - 1) / limit
rd.log.Debugf("Total downloads count is %d, total page count is %d", totalCount, maxPages)
rd.log.Debugf("Total downloads count is %d", totalCount)
maxParallelThreads := 8
if maxPages < maxParallelThreads {
maxParallelThreads = maxPages