60 lines
1.7 KiB
Go
60 lines
1.7 KiB
Go
package subsonic
|
|
|
|
// --- Album lists ---
|
|
|
|
type AlbumList struct {
|
|
Album []Child `xml:"album,omitempty" json:"album,omitempty"`
|
|
}
|
|
|
|
type AlbumList2 struct {
|
|
Album []AlbumID3 `xml:"album,omitempty" json:"album,omitempty"`
|
|
}
|
|
|
|
// --- Now playing ---
|
|
|
|
type NowPlaying struct {
|
|
Entry []NowPlayingEntry `xml:"entry,omitempty" json:"entry,omitempty"`
|
|
}
|
|
|
|
type NowPlayingEntry struct {
|
|
Child
|
|
Username string `xml:"username,attr" json:"username"`
|
|
MinutesAgo int `xml:"minutesAgo,attr" json:"minutesAgo"`
|
|
PlayerID int `xml:"playerId,attr" json:"playerId"`
|
|
PlayerName string `xml:"playerName,attr,omitempty" json:"playerName,omitempty"`
|
|
}
|
|
|
|
// --- Starred ---
|
|
|
|
type Starred struct {
|
|
Artist []Artist `xml:"artist,omitempty" json:"artist,omitempty"`
|
|
Album []Child `xml:"album,omitempty" json:"album,omitempty"`
|
|
Song []Child `xml:"song,omitempty" json:"song,omitempty"`
|
|
}
|
|
|
|
type Starred2 struct {
|
|
Artist []ArtistID3 `xml:"artist,omitempty" json:"artist,omitempty"`
|
|
Album []AlbumID3 `xml:"album,omitempty" json:"album,omitempty"`
|
|
Song []Child `xml:"song,omitempty" json:"song,omitempty"`
|
|
}
|
|
|
|
// --- Search ---
|
|
|
|
type SearchResult struct {
|
|
Offset int `xml:"offset,attr" json:"offset"`
|
|
TotalHits int `xml:"totalHits,attr" json:"totalHits"`
|
|
Match []Child `xml:"match,omitempty" json:"match,omitempty"`
|
|
}
|
|
|
|
type SearchResult2 struct {
|
|
Artist []Artist `xml:"artist,omitempty" json:"artist,omitempty"`
|
|
Album []Child `xml:"album,omitempty" json:"album,omitempty"`
|
|
Song []Child `xml:"song,omitempty" json:"song,omitempty"`
|
|
}
|
|
|
|
type SearchResult3 struct {
|
|
Artist []ArtistID3 `xml:"artist,omitempty" json:"artist,omitempty"`
|
|
Album []AlbumID3 `xml:"album,omitempty" json:"album,omitempty"`
|
|
Song []Child `xml:"song,omitempty" json:"song,omitempty"`
|
|
}
|