repair fixes!

This commit is contained in:
Ben Sarmiento
2023-11-19 01:04:48 +01:00
parent d77caa7575
commit 0b21b8d58c
6 changed files with 47 additions and 40 deletions

View File

@@ -15,7 +15,7 @@ import (
"github.com/debridmediamanager.com/zurg/internal/version"
"github.com/panjf2000/ants/v2"
// zurghttp "github.com/debridmediamanager.com/zurg/pkg/http"
zurghttp "github.com/debridmediamanager.com/zurg/pkg/http"
"github.com/debridmediamanager.com/zurg/pkg/logutil"
"github.com/debridmediamanager.com/zurg/pkg/realdebrid"
"github.com/hashicorp/golang-lru/v2/expirable"
@@ -43,7 +43,8 @@ func main() {
cache := expirable.NewLRU[string, string](1e4, nil, time.Hour)
rd := realdebrid.NewRealDebrid(config.GetToken(), logutil.NewLogger().Named("realdebrid"))
client := zurghttp.NewHTTPClient(config.GetToken(), 3, nil)
rd := realdebrid.NewRealDebrid(config.GetToken(), client, logutil.NewLogger().Named("realdebrid"))
p, err := ants.NewPool(config.GetNumOfWorkers())
if err != nil {
@@ -70,7 +71,7 @@ func main() {
}()
// log.Debugf("Initializing chunk manager, cores: %d", runtime.NumCPU())
// client := zurghttp.NewHTTPClient(config.GetToken(), 10, config)
// client := zurghttp.NewHTTPClient(config.GetToken(), 3, config)
// chunkMgr, err := chunk.NewManager(
// "", // in-memory chunks
// 10485760, // 10MB chunk size