mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-05 13:37:38 +03:00
Playlists now have all metadata. Also removed some duplicated code
This commit is contained in:
parent
516bd3bddf
commit
3cefc321b8
6 changed files with 23 additions and 55 deletions
|
@ -84,6 +84,14 @@ func (c *BaseAPIController) SendResponse(response responses.Subsonic) {
|
|||
}
|
||||
}
|
||||
|
||||
func (c *BaseAPIController) ToChildren(entries engine.Entries) []responses.Child {
|
||||
children := make([]responses.Child, len(entries))
|
||||
for i, entry := range entries {
|
||||
children[i] = c.ToChild(entry)
|
||||
}
|
||||
return children
|
||||
}
|
||||
|
||||
func (c *BaseAPIController) ToChild(entry engine.Entry) responses.Child {
|
||||
n := responses.Child{}
|
||||
n.Id = entry.Id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue