mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/davidfor/calibre
This commit is contained in:
commit
edc32ecdbd
@ -1839,15 +1839,15 @@ class KOBOTOUCH(KOBO):
|
|||||||
self.bookshelvelist = self.get_bookshelflist(connection)
|
self.bookshelvelist = self.get_bookshelflist(connection)
|
||||||
debug_print("KoboTouch:books - shelf list:", self.bookshelvelist)
|
debug_print("KoboTouch:books - shelf list:", self.bookshelvelist)
|
||||||
|
|
||||||
columns = 'Title, Attribution, DateCreated, ContentID, MimeType, ContentType, ImageId, ReadStatus, Description, Publisher, Language '
|
columns = 'Title, Attribution, DateCreated, ContentID, MimeType, ContentType, ImageId, ReadStatus, Description, Publisher '
|
||||||
if self.dbversion >= 16:
|
if self.dbversion >= 16:
|
||||||
columns += ', ___ExpirationStatus, FavouritesIndex, Accessibility'
|
columns += ', ___ExpirationStatus, FavouritesIndex, Accessibility'
|
||||||
else:
|
else:
|
||||||
columns += ', -1 as ___ExpirationStatus, -1 as FavouritesIndex, -1 as Accessibility'
|
columns += ', -1 as ___ExpirationStatus, -1 as FavouritesIndex, -1 as Accessibility'
|
||||||
if self.dbversion >= 33:
|
if self.dbversion >= 33:
|
||||||
columns += ', IsDownloaded, ISBN'
|
columns += ', Language, IsDownloaded, ISBN'
|
||||||
else:
|
else:
|
||||||
columns += ', "1" as IsDownloaded, null AS ISBN'
|
columns += ', NULL AS Language, "1" AS IsDownloaded, NULL AS ISBN'
|
||||||
if self.supports_series():
|
if self.supports_series():
|
||||||
columns += ", Series, SeriesNumber, ___UserID, ExternalId, Subtitle"
|
columns += ", Series, SeriesNumber, ___UserID, ExternalId, Subtitle"
|
||||||
else:
|
else:
|
||||||
@ -1915,7 +1915,7 @@ class KOBOTOUCH(KOBO):
|
|||||||
raise
|
raise
|
||||||
query= ('SELECT Title, Attribution, DateCreated, ContentID, MimeType, ContentType, '
|
query= ('SELECT Title, Attribution, DateCreated, ContentID, MimeType, ContentType, '
|
||||||
'ImageId, ReadStatus, -1 AS ___ExpirationStatus, "-1" AS FavouritesIndex, '
|
'ImageId, ReadStatus, -1 AS ___ExpirationStatus, "-1" AS FavouritesIndex, '
|
||||||
'null AS ISBN, Language '
|
'null AS ISBN, NULL AS Language '
|
||||||
'-1 AS Accessibility, 1 AS IsDownloaded, NULL AS Series, NULL AS SeriesNumber, null as Subtitle '
|
'-1 AS Accessibility, 1 AS IsDownloaded, NULL AS Series, NULL AS SeriesNumber, null as Subtitle '
|
||||||
'FROM content '
|
'FROM content '
|
||||||
'WHERE BookID IS NULL'
|
'WHERE BookID IS NULL'
|
||||||
@ -2325,17 +2325,18 @@ class KOBOTOUCH(KOBO):
|
|||||||
debug_print("KoboTouch:contentid_from_path - end - ContentID='%s'"%ContentID)
|
debug_print("KoboTouch:contentid_from_path - end - ContentID='%s'"%ContentID)
|
||||||
return ContentID
|
return ContentID
|
||||||
|
|
||||||
|
def get_content_type_from_path(self, path):
|
||||||
|
ContentType = 6
|
||||||
|
if self.fwversion < (1, 9, 17):
|
||||||
|
ContentType = super(KOBOTOUCH, self).get_content_type_from_path(path)
|
||||||
|
return ContentType
|
||||||
|
|
||||||
def get_content_type_from_extension(self, extension):
|
def get_content_type_from_extension(self, extension):
|
||||||
debug_print("KoboTouch:get_content_type_from_extension - start")
|
debug_print("KoboTouch:get_content_type_from_extension - start")
|
||||||
# With new firmware, ContentType appears to be 6 for all types of sideloaded books.
|
# With new firmware, ContentType appears to be 6 for all types of sideloaded books.
|
||||||
if self.fwversion >= (1,9,17) or extension == '.kobo' or extension == '.mobi':
|
ContentType = 6
|
||||||
debug_print("KoboTouch:get_content_type_from_extension - V2 firmware")
|
if self.fwversion < (1,9,17):
|
||||||
ContentType = 6
|
ContentType = super(KOBOTOUCH, self).get_content_type_from_extension(extension)
|
||||||
# For older firmware, it depends on the type of file.
|
|
||||||
elif extension == '.kobo' or extension == '.mobi':
|
|
||||||
ContentType = 6
|
|
||||||
else:
|
|
||||||
ContentType = 901
|
|
||||||
return ContentType
|
return ContentType
|
||||||
|
|
||||||
def set_plugboards(self, plugboards, pb_func):
|
def set_plugboards(self, plugboards, pb_func):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user