Delete bookmarks from the database when deleting a book

Not sure how I missed this, but the bookmarks where being left in the
database when the books were deleted. This brings it in line with what
happens when using the device to delete a book.

Fixes #1401502 [Delete bookmarks from the database when deleting a book](https://bugs.launchpad.net/calibre/+bug/1401502)
This commit is contained in:
David Forrester 2014-12-11 22:19:36 +11:00 committed by Kovid Goyal
parent f011529895
commit 6320ea10a0

View File

@ -2020,6 +2020,11 @@ class KOBOTOUCH(KOBO):
cursor = connection.cursor()
debug_print('KoboTouch:delete_via_sql: have cursor')
t = (ContentID,)
# Delete the Bookmarks
debug_print('KoboTouch:delete_via_sql: Delete from Bookmark')
cursor.execute('DELETE FROM Bookmark WHERE VolumeID = ?', t)
# Delete from the Bookshelf
debug_print('KoboTouch:delete_via_sql: Delete from the Bookshelf')
cursor.execute('delete from ShelfContent where ContentID = ?', t)