Sync from /srv/compose/unified-media-manager

This commit is contained in:
Christopher Mayor
2026-04-24 10:45:19 -07:00
commit 7dbd00e537
132 changed files with 25394 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
package download
import "context"
type DownloadProgress struct {
ID string `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
Progress float64 `json:"progress"`
Speed int64 `json:"speed"`
ETA int `json:"eta"`
Size int64 `json:"size"`
}
type CompletedDownload struct {
ID string `json:"id"`
Name string `json:"name"`
OutputPath string `json:"output_path"`
Size int64 `json:"size"`
Status string `json:"status"`
}
type DownloadClient interface {
Add(ctx context.Context, url string, category string) (string, error)
GetProgress(ctx context.Context, id string) (*DownloadProgress, error)
GetCompleted(ctx context.Context) ([]CompletedDownload, error)
Remove(ctx context.Context, id string) error
Pause(ctx context.Context, id string) error
Resume(ctx context.Context, id string) error
}