Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getBookmarks API should return single entry for each bookmark, not an array #310

Closed
Glandos opened this issue Apr 21, 2023 · 2 comments
Closed

Comments

@Glandos
Copy link

Glandos commented Apr 21, 2023

I am using Ultrasonic Android client, which fails to retrieve bookmarks from Gonic.
Indeed, based on the report made in https://gitlab.com/ultrasonic/ultrasonic/-/issues/1113 it seems that the API should returns:

{
  "subsonic-response": {
    "status": "ok",
    "version": "1.15.0",
    "type": "gonic",
    "bookmarks": {
      "bookmark": [
        {
          "entry": {
            "id": "tr-2762",
            "type": "tr"
          },
          "username": "tablette",
          "position": 17268,
          "comment": "",
          "created": "2023-04-21T21:54:13.694454843+02:00",
          "changed": "2023-04-21T21:54:13.695276602+02:00"
        }
      ]
    }
  }
}

and not

{
  "subsonic-response": {
    "status": "ok",
    "version": "1.15.0",
    "type": "gonic",
    "bookmarks": {
      "bookmark": [
        {
          "entry": [
            {
              "id": "tr-2762",
              "type": "tr"
            }
          ],
          "username": "tablette",
          "position": 17268,
          "comment": "",
          "created": "2023-04-21T21:54:13.694454843+02:00",
          "changed": "2023-04-21T21:54:13.695276602+02:00"
        }
      ]
    }
  }
}

Discussion was a bit more complete in the fix made for Navidrome in navidrome/navidrome#1099

I think the code is quite simple to change in

entries := []*spec.BookmarkEntry{{
but I still never have changed any line of Go in my life…

@sentriz
Copy link
Owner

sentriz commented Apr 21, 2023

thanks 👍

@Glandos
Copy link
Author

Glandos commented Apr 22, 2023

That wast fast, thanks!

I installed it manually from source, and now bookmarks are working. Well, Ultrasonic is not displaying correct info, but it's gonic's problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants