Adding fullpath and songCount to playlists
This commit is contained in:
@@ -27,6 +27,8 @@ func (c *PlaylistsController) GetAll() {
|
|||||||
for i, f := range *allPls {
|
for i, f := range *allPls {
|
||||||
playlists[i].Id = f.Id
|
playlists[i].Id = f.Id
|
||||||
playlists[i].Name = f.Name
|
playlists[i].Name = f.Name
|
||||||
|
playlists[i].Comment = "Original: " + f.FullPath
|
||||||
|
playlists[i].SongCount = len(f.Tracks)
|
||||||
}
|
}
|
||||||
response := c.NewEmpty()
|
response := c.NewEmpty()
|
||||||
response.Playlists = &responses.Playlists{Playlist: playlists}
|
response.Playlists = &responses.Playlists{Playlist: playlists}
|
||||||
|
|||||||
@@ -90,8 +90,10 @@ type AlbumList struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Playlist struct {
|
type Playlist struct {
|
||||||
Id string `xml:"id,attr" json:"id"`
|
Id string `xml:"id,attr" json:"id"`
|
||||||
Name string `xml:"name,attr" json:"name"`
|
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"`
|
||||||
/*
|
/*
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="allowedUser" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> <!--Added in 1.8.0-->
|
<xs:element name="allowedUser" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> <!--Added in 1.8.0-->
|
||||||
|
|||||||
Reference in New Issue
Block a user