This commit is contained in:
stefanodvx 2025-04-14 13:05:43 +02:00
parent 264c97183e
commit 3faede7b1c
74 changed files with 6228 additions and 1 deletions

14
models/download.go Normal file
View file

@ -0,0 +1,14 @@
package models
import "time"
type DownloadConfig struct {
ChunkSize int // size of each chunk in bytes
Concurrency int // maximum number of concurrent downloads
Timeout time.Duration // timeout for individual HTTP requests
DownloadDir string // directory to save downloaded files
RetryAttempts int // number of retry attempts per chunk
RetryDelay time.Duration // delay between retries
Remux bool // whether to remux the downloaded file with ffmpeg
ProgressUpdater func(float64) // optional function to report download progress
}