This commit is contained in:
Kovid Goyal 2022-05-03 20:09:01 +05:30
parent c1f6765fce
commit 1e91f0a659
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 4 additions and 10 deletions

View File

@ -2,15 +2,14 @@ __license__ = 'GPL v3'
__copyright__ = '2010-2012, , Timothy Legge <timlegge at gmail.com> and David Forrester <davidfor@internode.on.net>' __copyright__ = '2010-2012, , Timothy Legge <timlegge at gmail.com> and David Forrester <davidfor@internode.on.net>'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'
import os, time, sys import os, time
from functools import cmp_to_key
from calibre.constants import preferred_encoding, DEBUG from calibre.constants import preferred_encoding, DEBUG
from calibre import isbytestring from calibre import isbytestring
from calibre.ebooks.metadata.book.base import Metadata from calibre.ebooks.metadata.book.base import Metadata
from calibre.ebooks.metadata.book.formatter import SafeFormat from calibre.ebooks.metadata.book.formatter import SafeFormat
from calibre.devices.usbms.books import Book as Book_, CollectionsBookList, none_cmp from calibre.devices.usbms.books import Book as Book_, CollectionsBookList
from calibre.utils.config_base import prefs from calibre.utils.config_base import prefs
from calibre.devices.usbms.driver import debug_print from calibre.devices.usbms.driver import debug_print
from calibre.ebooks.metadata import author_to_author_sort from calibre.ebooks.metadata import author_to_author_sort
@ -263,7 +262,7 @@ class KTCollectionsBookList(CollectionsBookList):
for category in val: for category in val:
# debug_print("KTCollectionsBookList:get_collections - category=", category) # debug_print("KTCollectionsBookList:get_collections - category=", category)
if doing_dc: if doing_dc:
pass # No need to do anything with device_collections pass # No need to do anything with device_collections
elif fm is not None and fm['is_custom']: # is a custom field elif fm is not None and fm['is_custom']: # is a custom field
if fm['datatype'] == 'text' and len(category) > 1 and \ if fm['datatype'] == 'text' and len(category) > 1 and \
category[0] == '[' and category[-1] == ']': category[0] == '[' and category[-1] == ']':

View File

@ -2514,7 +2514,7 @@ class KOBOTOUCH(KOBO):
collections = booklists.get_collections(collections_attributes, collections = booklists.get_collections(collections_attributes,
collections_template=self.collections_template, collections_template=self.collections_template,
template_globals={ template_globals={
'serial_number': self.device_serial_no(), 'serial_number': self.device_serial_no(),
'firmware_version': self.fwversion, 'firmware_version': self.fwversion,
'display_firmware_version': self.display_fwversion, 'display_firmware_version': self.display_fwversion,
'dbversion': self.dbversion, 'dbversion': self.dbversion,
@ -3889,7 +3889,6 @@ class KOBOTOUCH(KOBO):
def has_activity_table(self): def has_activity_table(self):
return self.dbversion >= self.min_dbversion_activity return self.dbversion >= self.min_dbversion_activity
def modify_database_check(self, function): def modify_database_check(self, function):
# Checks to see whether the database version is supported # Checks to see whether the database version is supported
# and whether the user has chosen to support the firmware version # and whether the user has chosen to support the firmware version

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
__license__ = 'GPL v3' __license__ = 'GPL v3'
__copyright__ = '2015-2019, Kovid Goyal <kovid at kovidgoyal.net>' __copyright__ = '2015-2019, Kovid Goyal <kovid at kovidgoyal.net>'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'
@ -757,9 +756,6 @@ class MetadataGroupBox(DeviceOptionsGroupBox):
return self.bookstats_timetoread_upper_template_edit.template return self.bookstats_timetoread_upper_template_edit.template
from calibre.gui2.dialogs.template_line_editor import TemplateLineEditor
class TemplateConfig(QWidget): # {{{ class TemplateConfig(QWidget): # {{{
def __init__(self, val, label=None, tooltip=None): def __init__(self, val, label=None, tooltip=None):