Checkpoint

This commit is contained in:
maze authored and maze committed 2026-10-29 17:28:51 +01:00
1 parent 7b6db17870
commit 0295eb1ad2
125 files changed
+59376

No files matched your search

+46
View File
@@ -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)
}