mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-05-25 10:10:24 +08:00
refactor: simplify dler client interface
This commit is contained in:
@@ -7,10 +7,6 @@ import (
|
||||
"github.com/krau/SaveAny-Bot/pkg/consts/tglimit"
|
||||
)
|
||||
|
||||
type DlerClient interface {
|
||||
downloader.Client
|
||||
}
|
||||
|
||||
func NewDownloader(file TGFile) *downloader.Builder {
|
||||
return downloader.NewDownloader().WithPartSize(tglimit.MaxPartSize).
|
||||
Download(file.Dler(), file.Location()).WithThreads(dlutil.BestThreads(file.Size(), config.Cfg.Threads))
|
||||
|
||||
Reference in New Issue
Block a user