refactor: simplify dler client interface

This commit is contained in:
krau
2025-08-02 10:01:59 +08:00
parent ee5e0b8ff0
commit b9d14f79c8
3 changed files with 14 additions and 13 deletions

View File

@@ -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))