mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
SQL delete needs firmware check for older Kobo firmare
Kobo driver: Fix a regression when deleting empty shelves on Kobo devices with older firmware. Fixes #1192441 [Private bug](https://bugs.launchpad.net/calibre/+bug/1192441) As reported here, http://www.mobileread.com/forums/showthread.php?t=214760, if the Kobo device is using firmware before 2.5.0, it doesn't have the Activity table. The delete from this table when maintaining shelves needs a version check around it.
This commit is contained in:
parent
07c935b700
commit
0e14d36438
@ -1880,7 +1880,7 @@ class KOBOTOUCH(KOBO):
|
|||||||
|
|
||||||
# Remove any entries for the Activity table - removes tile from new home page
|
# Remove any entries for the Activity table - removes tile from new home page
|
||||||
if self.has_activity_table():
|
if self.has_activity_table():
|
||||||
debug_print('KoboTouch:delete_via_sql: detete from Activity')
|
debug_print('KoboTouch:delete_via_sql: delete from Activity')
|
||||||
cursor.execute('delete from Activity where Id =?', t)
|
cursor.execute('delete from Activity where Id =?', t)
|
||||||
|
|
||||||
connection.commit()
|
connection.commit()
|
||||||
@ -2391,6 +2391,7 @@ class KOBOTOUCH(KOBO):
|
|||||||
cursor = connection.cursor()
|
cursor = connection.cursor()
|
||||||
cursor.execute(delete_query)
|
cursor.execute(delete_query)
|
||||||
cursor.execute(update_query)
|
cursor.execute(update_query)
|
||||||
|
if self.has_activity_table():
|
||||||
cursor.execute(delete_activity_query)
|
cursor.execute(delete_activity_query)
|
||||||
connection.commit()
|
connection.commit()
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user