mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Updates to the Kobo driver to add support for the Kobo Clara 2e.
This commit is contained in:
parent
b329ae0c97
commit
ddca73b043
@ -10,6 +10,7 @@ Driver for Kobo eReaders. Supports all e-ink devices.
|
|||||||
|
|
||||||
Originally developed by Timothy Legge <timlegge@gmail.com>.
|
Originally developed by Timothy Legge <timlegge@gmail.com>.
|
||||||
Extended to support Touch firmware 2.0.0 and later and newer devices by David Forrester <davidfor@internode.on.net>
|
Extended to support Touch firmware 2.0.0 and later and newer devices by David Forrester <davidfor@internode.on.net>
|
||||||
|
Additional maintenance performed by Peter Thomas <peterjt@gmail.com>
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import os, time, shutil, re
|
import os, time, shutil, re
|
||||||
@ -1380,7 +1381,7 @@ class KOBOTOUCH(KOBO):
|
|||||||
'Communicate with the Kobo Touch, Glo, Mini, Aura HD,'
|
'Communicate with the Kobo Touch, Glo, Mini, Aura HD,'
|
||||||
' Aura H2O, Glo HD, Touch 2, Aura ONE, Aura Edition 2,'
|
' Aura H2O, Glo HD, Touch 2, Aura ONE, Aura Edition 2,'
|
||||||
' Aura H2O Edition 2, Clara HD, Forma, Libra H2O, Elipsa,'
|
' Aura H2O Edition 2, Clara HD, Forma, Libra H2O, Elipsa,'
|
||||||
' Sage and Libra 2 eReaders.'
|
' Sage ,Libra 2 and Clara 2E eReaders.'
|
||||||
' Based on the existing Kobo driver by %s.') % KOBO.author
|
' Based on the existing Kobo driver by %s.') % KOBO.author
|
||||||
# icon = 'devices/kobotouch.jpg'
|
# icon = 'devices/kobotouch.jpg'
|
||||||
|
|
||||||
@ -1419,6 +1420,7 @@ class KOBOTOUCH(KOBO):
|
|||||||
min_elipsa_fwversion = (4, 28, 17820)
|
min_elipsa_fwversion = (4, 28, 17820)
|
||||||
min_libra2_fwversion = (4, 29, 18730)
|
min_libra2_fwversion = (4, 29, 18730)
|
||||||
min_sage_fwversion = (4, 29, 18730)
|
min_sage_fwversion = (4, 29, 18730)
|
||||||
|
min_clara2e_fwversion = (4, 33, 19759)
|
||||||
min_fwversion_audiobooks = (4, 29, 18730)
|
min_fwversion_audiobooks = (4, 29, 18730)
|
||||||
min_fwversion_bookstats = (4, 32, 19501)
|
min_fwversion_bookstats = (4, 32, 19501)
|
||||||
|
|
||||||
@ -1447,6 +1449,7 @@ class KOBOTOUCH(KOBO):
|
|||||||
AURA_H2O_EDITION2_PRODUCT_ID = [0x4227]
|
AURA_H2O_EDITION2_PRODUCT_ID = [0x4227]
|
||||||
AURA_ONE_PRODUCT_ID = [0x4225]
|
AURA_ONE_PRODUCT_ID = [0x4225]
|
||||||
CLARA_HD_PRODUCT_ID = [0x4228]
|
CLARA_HD_PRODUCT_ID = [0x4228]
|
||||||
|
CLARA_2E_PRODUCT_ID = [0x4235]
|
||||||
ELIPSA_PRODUCT_ID = [0x4233]
|
ELIPSA_PRODUCT_ID = [0x4233]
|
||||||
FORMA_PRODUCT_ID = [0x4229]
|
FORMA_PRODUCT_ID = [0x4229]
|
||||||
GLO_PRODUCT_ID = [0x4173]
|
GLO_PRODUCT_ID = [0x4173]
|
||||||
@ -1464,7 +1467,7 @@ class KOBOTOUCH(KOBO):
|
|||||||
MINI_PRODUCT_ID + TOUCH_PRODUCT_ID + TOUCH2_PRODUCT_ID + \
|
MINI_PRODUCT_ID + TOUCH_PRODUCT_ID + TOUCH2_PRODUCT_ID + \
|
||||||
AURA_ONE_PRODUCT_ID + CLARA_HD_PRODUCT_ID + FORMA_PRODUCT_ID + LIBRA_H2O_PRODUCT_ID + \
|
AURA_ONE_PRODUCT_ID + CLARA_HD_PRODUCT_ID + FORMA_PRODUCT_ID + LIBRA_H2O_PRODUCT_ID + \
|
||||||
NIA_PRODUCT_ID + ELIPSA_PRODUCT_ID + \
|
NIA_PRODUCT_ID + ELIPSA_PRODUCT_ID + \
|
||||||
SAGE_PRODUCT_ID + LIBRA2_PRODUCT_ID
|
SAGE_PRODUCT_ID + LIBRA2_PRODUCT_ID + CLARA_2E_PRODUCT_ID
|
||||||
|
|
||||||
BCD = [0x0110, 0x0326, 0x401, 0x409]
|
BCD = [0x0110, 0x0326, 0x401, 0x409]
|
||||||
|
|
||||||
@ -1506,7 +1509,7 @@ class KOBOTOUCH(KOBO):
|
|||||||
# Kobo officially advertised the screen resolution with those chopped off.
|
# Kobo officially advertised the screen resolution with those chopped off.
|
||||||
' - N3_FULL.parsed': [(758,1014),0, 200,True,],
|
' - N3_FULL.parsed': [(758,1014),0, 200,True,],
|
||||||
}
|
}
|
||||||
# Glo HD and Clara HD share resolution, so the image sizes should be the same.
|
# Glo HD, Clara HD and Clara 2E share resolution, so the image sizes should be the same.
|
||||||
GLO_HD_COVER_FILE_ENDINGS = {
|
GLO_HD_COVER_FILE_ENDINGS = {
|
||||||
# Used for screensaver, home screen
|
# Used for screensaver, home screen
|
||||||
' - N3_FULL.parsed': [(1072,1448), 0, 200,True,],
|
' - N3_FULL.parsed': [(1072,1448), 0, 200,True,],
|
||||||
@ -3555,6 +3558,9 @@ class KOBOTOUCH(KOBO):
|
|||||||
def isClaraHD(self):
|
def isClaraHD(self):
|
||||||
return self.detected_device.idProduct in self.CLARA_HD_PRODUCT_ID
|
return self.detected_device.idProduct in self.CLARA_HD_PRODUCT_ID
|
||||||
|
|
||||||
|
def isClara2E(self):
|
||||||
|
return self.detected_device.idProduct in self.CLARA_2E_PRODUCT_ID
|
||||||
|
|
||||||
def isElipsa(self):
|
def isElipsa(self):
|
||||||
return self.detected_device.idProduct in self.ELIPSA_PRODUCT_ID
|
return self.detected_device.idProduct in self.ELIPSA_PRODUCT_ID
|
||||||
|
|
||||||
@ -3603,6 +3609,8 @@ class KOBOTOUCH(KOBO):
|
|||||||
_cover_file_endings = self.AURA_ONE_COVER_FILE_ENDINGS
|
_cover_file_endings = self.AURA_ONE_COVER_FILE_ENDINGS
|
||||||
elif self.isClaraHD():
|
elif self.isClaraHD():
|
||||||
_cover_file_endings = self.GLO_HD_COVER_FILE_ENDINGS
|
_cover_file_endings = self.GLO_HD_COVER_FILE_ENDINGS
|
||||||
|
elif self.isClara2E():
|
||||||
|
_cover_file_endings = self.GLO_HD_COVER_FILE_ENDINGS
|
||||||
elif self.isElipsa():
|
elif self.isElipsa():
|
||||||
_cover_file_endings = self.AURA_ONE_COVER_FILE_ENDINGS
|
_cover_file_endings = self.AURA_ONE_COVER_FILE_ENDINGS
|
||||||
elif self.isForma():
|
elif self.isForma():
|
||||||
@ -3649,6 +3657,8 @@ class KOBOTOUCH(KOBO):
|
|||||||
device_name = 'Kobo Aura ONE'
|
device_name = 'Kobo Aura ONE'
|
||||||
elif self.isClaraHD():
|
elif self.isClaraHD():
|
||||||
device_name = 'Kobo Clara HD'
|
device_name = 'Kobo Clara HD'
|
||||||
|
elif self.isClara2E():
|
||||||
|
device_name = 'Kobo Clara 2E'
|
||||||
elif self.isElipsa():
|
elif self.isElipsa():
|
||||||
device_name = 'Kobo Elipsa'
|
device_name = 'Kobo Elipsa'
|
||||||
elif self.isForma():
|
elif self.isForma():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user