mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Fix reading status problem with old Kobo firmware
Recent changes in the handling of collections in the KoboTouch driver broke how these were handled for the 1.9.x firmware. The change meant the reading status of all books in the device was reset. The problem was reported in http://www.mobileread.com/forums/showthread.php?t=278987.
This commit is contained in:
parent
0449f879f7
commit
73c420471d
@ -2248,7 +2248,8 @@ class KOBOTOUCH(KOBO):
|
||||
|
||||
with closing(self.device_database_connection()) as connection:
|
||||
|
||||
if self.manage_collections and collections:
|
||||
if self.manage_collections:
|
||||
if collections:
|
||||
# debug_print("KoboTouch:update_device_database_collections - length collections=" + unicode(len(collections)))
|
||||
|
||||
# Need to reset the collections outside the particular loops
|
||||
@ -2302,6 +2303,7 @@ class KOBOTOUCH(KOBO):
|
||||
self.set_bookshelf(connection, book, category)
|
||||
category_added = True
|
||||
elif category in readstatuslist.keys():
|
||||
debug_print("KoboTouch:update_device_database_collections - about to set_readstatus - category='%s'"%(category, ))
|
||||
# Manage ReadStatus
|
||||
self.set_readstatus(connection, book.contentID, readstatuslist.get(category))
|
||||
category_added = True
|
||||
@ -2944,11 +2946,11 @@ class KOBOTOUCH(KOBO):
|
||||
|
||||
@property
|
||||
def manage_collections(self):
|
||||
return self.get_pref('manage_collections') and self.supports_bookshelves
|
||||
return self.get_pref('manage_collections')
|
||||
|
||||
@property
|
||||
def create_collections(self):
|
||||
return self.manage_collections and self.get_pref('create_collections') and len(self.collections_columns) > 0
|
||||
return self.manage_collections and self.supports_bookshelves and self.get_pref('create_collections') and len(self.collections_columns) > 0
|
||||
|
||||
@property
|
||||
def collections_columns(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user