Update returned error codes
This commit is contained in:
@@ -10,11 +10,13 @@ import (
|
||||
"github.com/debridmediamanager/zurg/internal/config"
|
||||
zurghttp "github.com/debridmediamanager/zurg/pkg/http"
|
||||
"github.com/debridmediamanager/zurg/pkg/logutil"
|
||||
cmap "github.com/orcaman/concurrent-map/v2"
|
||||
"github.com/panjf2000/ants/v2"
|
||||
)
|
||||
|
||||
type RealDebrid struct {
|
||||
torrentsCache []Torrent
|
||||
UnrestrictMap cmap.ConcurrentMap[string, cmap.ConcurrentMap[string, *Download]]
|
||||
apiClient *zurghttp.HTTPClient
|
||||
unrestrictClient *zurghttp.HTTPClient
|
||||
downloadClient *zurghttp.HTTPClient
|
||||
@@ -33,7 +35,7 @@ func NewRealDebrid(apiClient, unrestrictClient, downloadClient *zurghttp.HTTPCli
|
||||
cfg: cfg,
|
||||
log: log,
|
||||
}
|
||||
rd.readCachedTorrents()
|
||||
rd.loadCachedTorrents()
|
||||
return rd
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ func (rd *RealDebrid) cacheTorrents(torrents []Torrent) {
|
||||
rd.torrentsCache = torrents
|
||||
}
|
||||
|
||||
func (rd *RealDebrid) readCachedTorrents() {
|
||||
func (rd *RealDebrid) loadCachedTorrents() {
|
||||
filePath := "data/info/all.json"
|
||||
file, err := os.Open(filePath)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user