mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 20:47:35 +03:00
parent
47f4e0a4de
commit
3e8d3e78c2
4 changed files with 4 additions and 4 deletions
|
@ -31,7 +31,7 @@ func (c *BookmarksController) GetBookmarks(w http.ResponseWriter, r *http.Reques
|
|||
response.Bookmarks = &responses.Bookmarks{}
|
||||
for _, bmk := range bmks {
|
||||
b := responses.Bookmark{
|
||||
Entry: []responses.Child{childFromMediaFile(r.Context(), bmk.Item)},
|
||||
Entry: childFromMediaFile(r.Context(), bmk.Item),
|
||||
Position: bmk.Position,
|
||||
Username: user.UserName,
|
||||
Comment: bmk.Comment,
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","bookmarks":{"bookmark":[{"entry":[{"id":"1","isDir":false,"title":"title","isVideo":false}],"position":123,"username":"user2","comment":"a comment","created":"0001-01-01T00:00:00Z","changed":"0001-01-01T00:00:00Z"}]}}
|
||||
{"status":"ok","version":"1.8.0","type":"navidrome","serverVersion":"v0.0.0","bookmarks":{"bookmark":[{"entry":{"id":"1","isDir":false,"title":"title","isVideo":false},"position":123,"username":"user2","comment":"a comment","created":"0001-01-01T00:00:00Z","changed":"0001-01-01T00:00:00Z"}]}}
|
||||
|
|
|
@ -328,7 +328,7 @@ type PlayQueue struct {
|
|||
}
|
||||
|
||||
type Bookmark struct {
|
||||
Entry []Child `xml:"entry,omitempty" json:"entry,omitempty"`
|
||||
Entry Child `xml:"entry,omitempty" json:"entry,omitempty"`
|
||||
Position int64 `xml:"position,attr,omitempty" json:"position,omitempty"`
|
||||
Username string `xml:"username,attr" json:"username"`
|
||||
Comment string `xml:"comment,attr" json:"comment"`
|
||||
|
|
|
@ -516,7 +516,7 @@ var _ = Describe("Responses", func() {
|
|||
Created: time.Time{},
|
||||
Changed: time.Time{},
|
||||
}
|
||||
bmk.Entry = []Child{{Id: "1", Title: "title", IsDir: false}}
|
||||
bmk.Entry = Child{Id: "1", Title: "title", IsDir: false}
|
||||
response.Bookmarks.Bookmark = []Bookmark{bmk}
|
||||
})
|
||||
It("should match .XML", func() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue