Halfway of getNowPlaying implementation

This commit is contained in:
Deluan
2016-03-17 09:34:32 -04:00
parent a3238ce17b
commit 68c456e188
13 changed files with 113 additions and 29 deletions
+15 -2
View File
@@ -18,8 +18,9 @@ type Subsonic struct {
AlbumList *AlbumList `xml:"albumList,omitempty" json:"albumList,omitempty"`
Playlists *Playlists `xml:"playlists,omitempty" json:"playlists,omitempty"`
Playlist *PlaylistWithSongs `xml:"playlist,omitempty" json:"playlist,omitempty"`
SearchResult2 *SearchResult2 `xml:"searchResult2,omitempty" json:"searchResult2,omitempty"`
Starred *Starred `xml:"starred,omitempty" json:"starred,omitempty"`
SearchResult2 *SearchResult2 `xml:"searchResult2,omitempty" json:"searchResult2,omitempty"`
Starred *Starred `xml:"starred,omitempty" json:"starred,omitempty"`
NowPlaying *NowPlaying `xml:"nowPlaying,omitempty" json:"nowPlaying,omitempty"`
}
type JsonWrapper struct {
@@ -138,6 +139,18 @@ type Starred struct {
Song []Child `xml:"song" json:"song,omitempty"`
}
type NowPlayingEntry struct {
Child
UserName string `xml:"username" json:"username,omitempty"`
MinutesAgo int `xml:"minutesAgo" json:"minutesAgo,omitempty"`
PlayerId int `xml:"playerId" json:"playerId,omitempty"`
PlayerName string `xml:"playerName" json:"playerName,omitempty"`
}
type NowPlaying struct {
Entry []NowPlayingEntry `xml:"entry" json:"entry,omitempty"`
}
type User struct {
Username string `xml:"username,attr" json:"username"`
Email string `xml:"email,attr,omitempty" json:"email,omitempty"`