From debc84b2406753a2e2abf2dd033c4fc111503c2f Mon Sep 17 00:00:00 2001 From: Timothy Legge Date: Thu, 14 Jul 2011 21:02:08 -0300 Subject: [PATCH 1/3] Only one of the categories can match --- src/calibre/devices/kobo/driver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py index ab05b683eb..17716a2588 100644 --- a/src/calibre/devices/kobo/driver.py +++ b/src/calibre/devices/kobo/driver.py @@ -693,10 +693,10 @@ class KOBO(USBMS): if category in readstatuslist.keys(): # Manage ReadStatus self.set_readstatus(connection, ContentID, readstatuslist.get(category)) - if category == 'Shortlist' and self.dbversion >= 14: + elif category == 'Shortlist' and self.dbversion >= 14: # Manage FavouritesIndex/Shortlist self.set_favouritesindex(connection, ContentID) - if category in accessibilitylist.keys(): + elif category in accessibilitylist.keys(): # Do not manage the Accessibility List pass else: # No collections From 2d80aca4b033456164c5cf757673473b69b60a18 Mon Sep 17 00:00:00 2001 From: Timothy Legge Date: Fri, 15 Jul 2011 22:24:25 -0300 Subject: [PATCH 2/3] Kobo - fix list for customization messages --- src/calibre/devices/kobo/driver.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py index 17716a2588..367110f4a2 100644 --- a/src/calibre/devices/kobo/driver.py +++ b/src/calibre/devices/kobo/driver.py @@ -48,12 +48,16 @@ class KOBO(USBMS): VIRTUAL_BOOK_EXTENSIONS = frozenset(['kobo']) - EXTRA_CUSTOMIZATION_MESSAGE = _('The Kobo supports only one collection ' - 'currently: the \"Im_Reading\" list. Create a tag called \"Im_Reading\" ')+\ - 'for automatic management' + EXTRA_CUSTOMIZATION_MESSAGE = [ + _('The Kobo supports several collections including ')+\ + 'Read, Closed, Im_Reading ' +\ + _('Create tags for automatic management'), + ] EXTRA_CUSTOMIZATION_DEFAULT = ', '.join(['tags']) + OPT_COLLECTIONS = 0 + def initialize(self): USBMS.initialize(self) self.book_class = Book @@ -723,7 +727,7 @@ class KOBO(USBMS): opts = self.settings() if opts.extra_customization: collections = [x.lower().strip() for x in - opts.extra_customization.split(',')] + opts.extra_customization[self.OPT_COLLECTIONS].split(',')] else: collections = [] From 36f167da4762d47f9982d0aebca255e3a206a4d8 Mon Sep 17 00:00:00 2001 From: Timothy Legge Date: Fri, 15 Jul 2011 22:27:13 -0300 Subject: [PATCH 3/3] Kobo - Really should increment the driver version on occasion --- src/calibre/devices/kobo/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py index 367110f4a2..f62b0b1180 100644 --- a/src/calibre/devices/kobo/driver.py +++ b/src/calibre/devices/kobo/driver.py @@ -22,7 +22,7 @@ class KOBO(USBMS): gui_name = 'Kobo Reader' description = _('Communicate with the Kobo Reader') author = 'Timothy Legge' - version = (1, 0, 9) + version = (1, 0, 10) dbversion = 0 fwversion = 0