Emulate the Kobo device delete more closely. Leave the Book record, the next server sync should delete them

This commit is contained in:
Timothy Legge 2011-06-21 00:06:25 -03:00
parent 83634d8a54
commit 43c9ebe77f

View File

@ -280,8 +280,12 @@ class KOBO(USBMS):
cursor.execute('delete from content_keys where volumeid = ?', t)
# Delete the chapters associated with the book next
t = (ContentID,ContentID,)
cursor.execute('delete from content where BookID = ? or ContentID = ?', t)
t = (ContentID,)
# Kobo does not delete the Book row (ie the row where the BookID is Null)
# The next server sync should remove the row
cursor.execute('delete from content where BookID = ?', t)
cursor.execute('update content set ReadStatus=0, FirstTimeReading = \'true\', ___PercentRead=0, ___ExpirationStatus=3 ' \
'where BookID is Null and ContentID =?',t)
connection.commit()