Currently, if a media item (track or podcast episode) is removed the
entries in the bookmark table that refer to the now missing media item
are left in the table. This commit adds a cleanup method which is part
of the scan.
Signed-off-by: Eric B Munson <eric@munsonfam.org>
Currently if a bookmark exists for an item that does not exist in the
db, either because it has been removed or it never did, the user is
prevented from retrieving any bookmarks. We can be in this state if
media has moved or been deleted, but also because the createBookmark
endpoint does not verify the item id provided.
This patch makes the getBookmarks endpoint ignore bookmarks for missing
items.
Fixes: https://github.com/sentriz/gonic/issues/578
Signed-off-by: Eric B Munson <eric@munsonfam.org>