diff --git a/api/playlists.go b/api/playlists.go index 26f83abc..38c2c492 100644 --- a/api/playlists.go +++ b/api/playlists.go @@ -27,6 +27,8 @@ func (c *PlaylistsController) GetAll() { for i, f := range *allPls { playlists[i].Id = f.Id playlists[i].Name = f.Name + playlists[i].Comment = "Original: " + f.FullPath + playlists[i].SongCount = len(f.Tracks) } response := c.NewEmpty() response.Playlists = &responses.Playlists{Playlist: playlists} diff --git a/api/responses/responses.go b/api/responses/responses.go index f8958393..e751470b 100644 --- a/api/responses/responses.go +++ b/api/responses/responses.go @@ -90,8 +90,10 @@ type AlbumList struct { } type Playlist struct { - Id string `xml:"id,attr" json:"id"` - Name string `xml:"name,attr" json:"name"` + Id string `xml:"id,attr" json:"id"` + Name string `xml:"name,attr" json:"name"` + Comment string `xml:"comment,attr,omitempty" json:"comment,omitempty"` + SongCount int `xml:"songCount,attr,omitempty" json:"songCount,omitempty"` /*