package models import "sync/atomic" type Status string const ( StatusStaged Status = "staged" StatusPending Status = "pending" StatusDownloading Status = "downloading" StatusDone Status = "done" StatusFailed Status = "failed" ) type TrackProgress struct { ID string `json:"id"` TrackNumber int `json:"track_number"` Title string `json:"title"` Status Status `json:"status"` Percent int `json:"percent"` DownloadedBytes int64 `json:"downloaded_bytes"` TotalBytes int64 `json:"total_bytes"` Counter *atomic.Int64 `json:"-"` } type QueueItem struct { Release RequestedBy string `json:"requested_by"` Status Status `json:"status"` Percent int `json:"percent"` DownloadedBytes int64 `json:"downloaded_bytes"` TotalBytes int64 `json:"total_bytes"` Tracks []*TrackProgress `json:"tracks"` }