Checkpoint
This commit is contained in:
125 files changed
+59376
No files matched your search
@@ -0,0 +1,46 @@
|
||||
package bragi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"image"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Status represents the current status of the audio player.
|
||||
type Status struct {
|
||||
Audio string
|
||||
Bitrate int
|
||||
Elapsed time.Duration
|
||||
ElapsedPercentage float64
|
||||
Err string
|
||||
Volume int
|
||||
Track *Track
|
||||
source Source
|
||||
}
|
||||
|
||||
func (s *Status) Source() Source {
|
||||
return s.source
|
||||
}
|
||||
|
||||
// Track represents an audio track.
|
||||
type Track struct {
|
||||
Artist string
|
||||
Title string
|
||||
Album string
|
||||
Label string
|
||||
Date time.Time
|
||||
Track int
|
||||
Disc int
|
||||
Duration time.Duration
|
||||
Format string
|
||||
Genre []string
|
||||
Path string
|
||||
Image image.Image
|
||||
}
|
||||
|
||||
func (t *Track) String() string {
|
||||
if t == nil {
|
||||
return "nil"
|
||||
}
|
||||
return fmt.Sprintf("%s - %s (%d on %s, %s)", t.Artist, t.Title, t.Track, t.Album, t.Duration)
|
||||
}
|
||||
Reference in new issue
Block a user