Fix detection issues
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/debridmediamanager/zurg/internal/config"
|
||||
zurghttp "github.com/debridmediamanager/zurg/pkg/http"
|
||||
"github.com/debridmediamanager/zurg/pkg/logutil"
|
||||
)
|
||||
@@ -16,14 +17,16 @@ type RealDebrid struct {
|
||||
client *zurghttp.HTTPClient
|
||||
unrestrictClient *zurghttp.HTTPClient
|
||||
downloadClient *zurghttp.HTTPClient
|
||||
cfg config.ConfigInterface
|
||||
log *logutil.Logger
|
||||
}
|
||||
|
||||
func NewRealDebrid(client, unrestrictClient, downloadClient *zurghttp.HTTPClient, log *logutil.Logger) *RealDebrid {
|
||||
func NewRealDebrid(client, unrestrictClient, downloadClient *zurghttp.HTTPClient, cfg config.ConfigInterface, log *logutil.Logger) *RealDebrid {
|
||||
return &RealDebrid{
|
||||
client: client,
|
||||
unrestrictClient: unrestrictClient,
|
||||
downloadClient: downloadClient,
|
||||
cfg: cfg,
|
||||
log: log,
|
||||
}
|
||||
}
|
||||
@@ -119,7 +122,7 @@ func (rd *RealDebrid) GetTorrents(customLimit int, active bool) ([]Torrent, int,
|
||||
page := 1
|
||||
limit := customLimit
|
||||
if limit == 0 {
|
||||
limit = 100
|
||||
limit = rd.cfg.GetTorrentsCount()
|
||||
}
|
||||
totalCount := 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user