prototyping

This commit is contained in:
2023-01-10 21:33:21 +01:00
parent 9aef8fc47b
commit 299b195b52
4 changed files with 37 additions and 23 deletions

View File

@@ -34,6 +34,14 @@ func (t *Service) Progess(args Args, progress *DownloadProgress) error {
return nil
}
// Progess retrieves the Progress of a specific Process given its Id
func (t *Service) Formats(args Args, progress *DownloadFormats) error {
var err error
p := Process{url: args.URL}
*progress, err = p.GetFormatsSync()
return err
}
// Pending retrieves a slice of all Pending/Running processes ids
func (t *Service) Pending(args NoArgs, pending *Pending) error {
*pending = Pending(db.Keys())