More metadata for children (albums/mediafiles)

This commit is contained in:
Deluan 2016-03-21 09:50:46 -04:00
parent 37f72f2efc
commit 5fd9da505e
5 changed files with 42 additions and 14 deletions

View file

@ -104,5 +104,14 @@ func (c *BaseAPIController) ToChild(entry engine.Entry) responses.Child {
if !entry.Starred.IsZero() {
n.Starred = &entry.Starred
}
n.Path = entry.Path
n.PlayCount = entry.PlayCount
n.DiscNumber = entry.DiscNumber
if !entry.Created.IsZero() {
n.Created = &entry.Created
}
n.AlbumId = entry.AlbumId
n.ArtistId = entry.ArtistId
n.Type = entry.Type
return n
}