mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-08 11:18:41 +01:00
getStarred2.view implemented
This commit is contained in:
parent
615dc862af
commit
a562bfd17e
3 changed files with 17 additions and 0 deletions
|
|
@ -91,6 +91,21 @@ func (c *AlbumListController) GetStarred() {
|
|||
c.SendResponse(response)
|
||||
}
|
||||
|
||||
func (c *AlbumListController) GetStarred2() {
|
||||
albums, mediaFiles, err := c.listGen.GetAllStarred()
|
||||
if err != nil {
|
||||
beego.Error("Error retrieving starred media:", err)
|
||||
c.SendError(responses.ErrorGeneric, "Internal Error")
|
||||
}
|
||||
|
||||
response := c.NewEmpty()
|
||||
response.Starred2 = &responses.Starred{}
|
||||
response.Starred2.Album = c.ToAlbums(albums)
|
||||
response.Starred2.Song = c.ToChildren(mediaFiles)
|
||||
|
||||
c.SendResponse(response)
|
||||
}
|
||||
|
||||
func (c *AlbumListController) GetNowPlaying() {
|
||||
npInfos, err := c.listGen.GetNowPlaying()
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ type Subsonic struct {
|
|||
Playlist *PlaylistWithSongs `xml:"playlist,omitempty" json:"playlist,omitempty"`
|
||||
SearchResult2 *SearchResult2 `xml:"searchResult2,omitempty" json:"searchResult2,omitempty"`
|
||||
Starred *Starred `xml:"starred,omitempty" json:"starred,omitempty"`
|
||||
Starred2 *Starred `xml:"starred2,omitempty" json:"starred2,omitempty"`
|
||||
NowPlaying *NowPlaying `xml:"nowPlaying,omitempty" json:"nowPlaying,omitempty"`
|
||||
Song *Child `xml:"song,omitempty" json:"song,omitempty"`
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue