mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix regression that broke customization of Kobo driver
This commit is contained in:
commit
847ac0dee1
@ -22,7 +22,7 @@ class KOBO(USBMS):
|
|||||||
gui_name = 'Kobo Reader'
|
gui_name = 'Kobo Reader'
|
||||||
description = _('Communicate with the Kobo Reader')
|
description = _('Communicate with the Kobo Reader')
|
||||||
author = 'Timothy Legge'
|
author = 'Timothy Legge'
|
||||||
version = (1, 0, 9)
|
version = (1, 0, 10)
|
||||||
|
|
||||||
dbversion = 0
|
dbversion = 0
|
||||||
fwversion = 0
|
fwversion = 0
|
||||||
@ -48,12 +48,16 @@ class KOBO(USBMS):
|
|||||||
|
|
||||||
VIRTUAL_BOOK_EXTENSIONS = frozenset(['kobo'])
|
VIRTUAL_BOOK_EXTENSIONS = frozenset(['kobo'])
|
||||||
|
|
||||||
EXTRA_CUSTOMIZATION_MESSAGE = _('The Kobo supports only one collection '
|
EXTRA_CUSTOMIZATION_MESSAGE = [
|
||||||
'currently: the \"Im_Reading\" list. Create a tag called \"Im_Reading\" ')+\
|
_('The Kobo supports several collections including ')+\
|
||||||
'for automatic management'
|
'Read, Closed, Im_Reading ' +\
|
||||||
|
_('Create tags for automatic management'),
|
||||||
|
]
|
||||||
|
|
||||||
EXTRA_CUSTOMIZATION_DEFAULT = ', '.join(['tags'])
|
EXTRA_CUSTOMIZATION_DEFAULT = ', '.join(['tags'])
|
||||||
|
|
||||||
|
OPT_COLLECTIONS = 0
|
||||||
|
|
||||||
def initialize(self):
|
def initialize(self):
|
||||||
USBMS.initialize(self)
|
USBMS.initialize(self)
|
||||||
self.book_class = Book
|
self.book_class = Book
|
||||||
@ -693,10 +697,10 @@ class KOBO(USBMS):
|
|||||||
if category in readstatuslist.keys():
|
if category in readstatuslist.keys():
|
||||||
# Manage ReadStatus
|
# Manage ReadStatus
|
||||||
self.set_readstatus(connection, ContentID, readstatuslist.get(category))
|
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
|
# Manage FavouritesIndex/Shortlist
|
||||||
self.set_favouritesindex(connection, ContentID)
|
self.set_favouritesindex(connection, ContentID)
|
||||||
if category in accessibilitylist.keys():
|
elif category in accessibilitylist.keys():
|
||||||
# Do not manage the Accessibility List
|
# Do not manage the Accessibility List
|
||||||
pass
|
pass
|
||||||
else: # No collections
|
else: # No collections
|
||||||
@ -723,7 +727,7 @@ class KOBO(USBMS):
|
|||||||
opts = self.settings()
|
opts = self.settings()
|
||||||
if opts.extra_customization:
|
if opts.extra_customization:
|
||||||
collections = [x.lower().strip() for x in
|
collections = [x.lower().strip() for x in
|
||||||
opts.extra_customization.split(',')]
|
opts.extra_customization[self.OPT_COLLECTIONS].split(',')]
|
||||||
else:
|
else:
|
||||||
collections = []
|
collections = []
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user