This commit is contained in:
Kovid Goyal 2020-05-15 07:57:50 +05:30
commit 86300075cf
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 12 additions and 6 deletions

View File

@ -30,6 +30,8 @@
- title: 'Tag browser: Allow adding/removing tags/authors/etc. to the currently selected book by right clicking on that tag and choosing "Apply to selected books".' - title: 'Tag browser: Allow adding/removing tags/authors/etc. to the currently selected book by right clicking on that tag and choosing "Apply to selected books".'
tickets: [1878308] tickets: [1878308]
- title: "Kobo driver: Add support for updated firmware"
- title: "Manage categories dialog: When editing a value with multiple values selected, change them all" - title: "Manage categories dialog: When editing a value with multiple values selected, change them all"
- title: "Book list column header context menu: Add an entry to resize the column to fit its current contents." - title: "Book list column header context menu: Add an entry to resize the column to fit its current contents."

View File

@ -83,7 +83,7 @@ class KOBO(USBMS):
dbversion = 0 dbversion = 0
fwversion = (0,0,0) fwversion = (0,0,0)
supported_dbversion = 158 supported_dbversion = 159
has_kepubs = False has_kepubs = False
supported_platforms = ['windows', 'osx', 'linux'] supported_platforms = ['windows', 'osx', 'linux']
@ -1349,7 +1349,7 @@ class KOBOTOUCH(KOBO):
' Based on the existing Kobo driver by %s.') % KOBO.author ' Based on the existing Kobo driver by %s.') % KOBO.author
# icon = I('devices/kobotouch.jpg') # icon = I('devices/kobotouch.jpg')
supported_dbversion = 158 supported_dbversion = 159
min_supported_dbversion = 53 min_supported_dbversion = 53
min_dbversion_series = 65 min_dbversion_series = 65
min_dbversion_externalid = 65 min_dbversion_externalid = 65
@ -1362,7 +1362,7 @@ class KOBOTOUCH(KOBO):
# Starting with firmware version 3.19.x, the last number appears to be is a # Starting with firmware version 3.19.x, the last number appears to be is a
# build number. A number will be recorded here but it can be safely ignored # build number. A number will be recorded here but it can be safely ignored
# when testing the firmware version. # when testing the firmware version.
max_supported_fwversion = (4, 20, 14601) max_supported_fwversion = (4, 21, 15015)
# The following document firwmare versions where new function or devices were added. # The following document firwmare versions where new function or devices were added.
# Not all are used, but this feels a good place to record it. # Not all are used, but this feels a good place to record it.
min_fwversion_shelves = (2, 0, 0) min_fwversion_shelves = (2, 0, 0)
@ -2023,7 +2023,7 @@ class KOBOTOUCH(KOBO):
debug_print("KoboTouch:books - end - oncard='%s'"%oncard) debug_print("KoboTouch:books - end - oncard='%s'"%oncard)
return bl return bl
def path_from_contentid(self, ContentID, ContentType, MimeType, oncard, externalId): def path_from_contentid(self, ContentID, ContentType, MimeType, oncard, externalId=None):
path = ContentID path = ContentID
if not externalId: if not externalId:
@ -2032,7 +2032,7 @@ class KOBOTOUCH(KOBO):
if oncard == 'cardb': if oncard == 'cardb':
print('path from_contentid cardb') print('path from_contentid cardb')
else: else:
if (ContentType == "6" or ContentType == "10"): # and MimeType == 'application/x-kobo-epub+zip': if (ContentType == "6" or ContentType == "10"):
if path.startswith("file:///mnt/onboard/"): if path.startswith("file:///mnt/onboard/"):
path = self._main_prefix + path.replace("file:///mnt/onboard/", '') path = self._main_prefix + path.replace("file:///mnt/onboard/", '')
elif path.startswith("file:///mnt/sd/"): elif path.startswith("file:///mnt/sd/"):
@ -3726,7 +3726,11 @@ class KOBOTOUCH(KOBO):
if not self.debugging_title and not self.debugging_title == '': if not self.debugging_title and not self.debugging_title == '':
self.debugging_title = self.get_debugging_title() self.debugging_title = self.get_debugging_title()
is_debugging = len(self.debugging_title) > 0 and title.lower().find(self.debugging_title.lower()) >= 0 or len(title) == 0 try:
is_debugging = len(self.debugging_title) > 0 and title.lower().find(self.debugging_title.lower()) >= 0 or len(title) == 0
except:
debug_print(("KoboTouch::is_debugging_title - Exception checking debugging title for title '{0}'.").format(title))
is_debugging = False
return is_debugging return is_debugging