Add support for the jukebox endpoint
This supports most of jukeboxControl.view as far as i can tell. Things seem to be playing ok without freaking out I've also only tested it a little bit with ultrasonic but it does appear to be working pretty well
This commit is contained in:
@@ -41,6 +41,8 @@ type Response struct {
|
||||
ArtistInfoTwo *ArtistInfo `xml:"artistInfo2" json:"artistInfo2,omitempty"`
|
||||
Genres *Genres `xml:"genres" json:"genres,omitempty"`
|
||||
PlayQueue *PlayQueue `xml:"playQueue" json:"playQueue,omitempty"`
|
||||
JukeboxStatus *JukeboxStatus `xml:"jukeboxStatus" json:"jukeboxStatus,omitempty"`
|
||||
JukeboxPlaylist *JukeboxPlaylist `xml:"jukeboxPlaylist" json:"jukeboxPlaylist,omitempty"`
|
||||
}
|
||||
|
||||
func NewResponse() *Response {
|
||||
@@ -269,3 +271,15 @@ type PlayQueue struct {
|
||||
ChangedBy string `xml:"changedBy,attr" json:"changedBy"`
|
||||
List []*TrackChild `xml:"entry,omitempty" json:"entry,omitempty"`
|
||||
}
|
||||
|
||||
type JukeboxStatus struct {
|
||||
CurrentIndex int `xml:"currentIndex,attr" json:"currentIndex"`
|
||||
Playing bool `xml:"playing,attr" json:"playing"`
|
||||
Gain float64 `xml:"gain,attr" json:"gain"`
|
||||
Position int `xml:"position,attr" json:"position"`
|
||||
}
|
||||
|
||||
type JukeboxPlaylist struct {
|
||||
List []*TrackChild `xml:"entry,omitempty" json:"entry,omitempty"`
|
||||
JukeboxStatus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user