sentriz / gonic

music streaming server / free-software subsonic server API implementation
ircs://irc.libera.chat/#gonic
GNU General Public License v3.0
1.49k stars 105 forks source link

Error 10 when retrieving bookmarks #490

Closed gardebreak closed 2 months ago

gardebreak commented 3 months ago

gonic version: 0.16.4

if from docker, docker tag: docker.io/sentriz/gonic:v0.16.4

A couple of different clients (DSub and Ultrasonic on Android) are unable to retrieve bookmarks from the server. I can see the GET /getBookmarks requests in the logs, followed by subsonic error code 10: finding entry: record not found.

I had created a bookmark on a song and then moved that song's file to a different directory and rescanned, at which point bookmarks stopped working. Assuming the song's track ID changed after it moved to the new directory, maybe the bookmark is associated with the old, invalid track ID?

gardebreak commented 3 months ago

Removing the offending bookmark from the database fixes the problem.

DELETE FROM bookmarks WHERE id = 4;