Use the chunk manager properly
This commit is contained in:
@@ -6,8 +6,8 @@ import (
|
||||
"hash/fnv"
|
||||
"os"
|
||||
|
||||
"github.com/debridmediamanager.com/zurg/internal/config"
|
||||
"github.com/debridmediamanager.com/zurg/internal/torrent"
|
||||
zurghttp "github.com/debridmediamanager.com/zurg/pkg/http"
|
||||
)
|
||||
|
||||
// Manager manages chunks on disk
|
||||
@@ -59,7 +59,7 @@ func NewManager(
|
||||
loadThreads,
|
||||
maxChunks int,
|
||||
torMgr *torrent.TorrentManager,
|
||||
cfg config.ConfigInterface) (*Manager, error) {
|
||||
client *zurghttp.HTTPClient) (*Manager, error) {
|
||||
|
||||
pageSize := int64(os.Getpagesize())
|
||||
if chunkSize < pageSize {
|
||||
@@ -82,7 +82,7 @@ func NewManager(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
downloader, err := NewDownloader(loadThreads, storage, chunkSize, torMgr)
|
||||
downloader, err := NewDownloader(loadThreads, storage, chunkSize, torMgr, client)
|
||||
if nil != err {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user