Playlists now have all metadata. Also removed some duplicated code

This commit is contained in:
Deluan
2016-03-21 11:57:04 -04:00
parent 516bd3bddf
commit 3cefc321b8
6 changed files with 23 additions and 55 deletions
+2 -8
View File
@@ -44,14 +44,8 @@ func (c *SearchingController) Search2() {
for i, e := range as {
searchResult2.Artist[i] = responses.Artist{Id: e.Id, Name: e.Title}
}
searchResult2.Album = make([]responses.Child, len(als))
for i, e := range als {
searchResult2.Album[i] = c.ToChild(e)
}
searchResult2.Song = make([]responses.Child, len(mfs))
for i, e := range mfs {
searchResult2.Song[i] = c.ToChild(e)
}
searchResult2.Album = c.ToChildren(als)
searchResult2.Song = c.ToChildren(mfs)
response.SearchResult2 = searchResult2
c.SendResponse(response)
}