mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-05 13:37:38 +03:00
getIndexes returning list of artists and ignoredArticles
This commit is contained in:
parent
e0f214d356
commit
8e482bc494
3 changed files with 26 additions and 10 deletions
|
@ -23,10 +23,15 @@ func (c *GetIndexesController) Get() {
|
|||
beego.Error("Error retrieving Indexes:", err)
|
||||
c.CustomAbort(200, string(responses.NewError(responses.ERROR_GENERIC, "Internal Error")))
|
||||
}
|
||||
res := &responses.ArtistIndex{}
|
||||
res.Index = make([]responses.Index, len(indexes))
|
||||
res := &responses.ArtistIndex{IgnoredArticles: beego.AppConfig.String("ignoredArticles")}
|
||||
res.Index = make([]responses.IdxIndex, len(indexes))
|
||||
for i, idx := range indexes {
|
||||
res.Index[i].Name = idx.Id
|
||||
res.Index[i].Artists = make([]responses.IdxArtist, len(idx.Artists))
|
||||
for j, a := range idx.Artists {
|
||||
res.Index[i].Artists[j].Id = a.ArtistId
|
||||
res.Index[i].Artists[j].Name = a.Artist
|
||||
}
|
||||
}
|
||||
|
||||
c.Ctx.Output.Body(responses.NewXML(res))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue