diff --git a/server/ctrlsubsonic/handlers_bookmark.go b/server/ctrlsubsonic/handlers_bookmark.go index 60e8f93..5ff3088 100644 --- a/server/ctrlsubsonic/handlers_bookmark.go +++ b/server/ctrlsubsonic/handlers_bookmark.go @@ -31,17 +31,17 @@ func (c *Controller) ServeGetBookmarks(r *http.Request) *spec.Response { Type: specid.IDT(bookmark.EntryIDType), Value: bookmark.EntryID, } - entries := []*spec.BookmarkEntry{{ + entry := spec.BookmarkEntry{ ID: specid, Type: bookmark.EntryIDType, - }} + } sub.Bookmarks.List = append(sub.Bookmarks.List, &spec.Bookmark{ Username: user.Name, Position: bookmark.Position, Comment: bookmark.Comment, Created: bookmark.CreatedAt, Changed: bookmark.UpdatedAt, - Entries: entries, + Entry: entry, }) } return sub diff --git a/server/ctrlsubsonic/spec/spec.go b/server/ctrlsubsonic/spec/spec.go index 49012e0..2fbf01a 100644 --- a/server/ctrlsubsonic/spec/spec.go +++ b/server/ctrlsubsonic/spec/spec.go @@ -370,12 +370,12 @@ type Bookmarks struct { } type Bookmark struct { - Entries []*BookmarkEntry `xml:"entry,omitempty" json:"entry,omitempty"` - Username string `xml:"username,attr" json:"username"` - Position int `xml:"position,attr" json:"position"` - Comment string `xml:"comment,attr" json:"comment"` - Created time.Time `xml:"created,attr" json:"created"` - Changed time.Time `xml:"changed,attr" json:"changed"` + Entry BookmarkEntry `xml:"entry,omitempty" json:"entry,omitempty"` + Username string `xml:"username,attr" json:"username"` + Position int `xml:"position,attr" json:"position"` + Comment string `xml:"comment,attr" json:"comment"` + Created time.Time `xml:"created,attr" json:"created"` + Changed time.Time `xml:"changed,attr" json:"changed"` } type BookmarkEntry struct {