mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix #7608 (Support for Acer Lumiread)
This commit is contained in:
parent
1b3c8c0975
commit
a1efc0cf1b
@ -476,7 +476,7 @@ from calibre.devices.teclast.driver import TECLAST_K3, NEWSMY, IPAPYRUS, \
|
|||||||
SOVOS, PICO
|
SOVOS, PICO
|
||||||
from calibre.devices.sne.driver import SNE
|
from calibre.devices.sne.driver import SNE
|
||||||
from calibre.devices.misc import PALMPRE, AVANT, SWEEX, PDNOVEL, KOGAN, \
|
from calibre.devices.misc import PALMPRE, AVANT, SWEEX, PDNOVEL, KOGAN, \
|
||||||
GEMEI, VELOCITYMICRO, PDNOVEL_KOBO, Q600
|
GEMEI, VELOCITYMICRO, PDNOVEL_KOBO, Q600, LUMIREAD
|
||||||
from calibre.devices.folder_device.driver import FOLDER_DEVICE_FOR_CONFIG
|
from calibre.devices.folder_device.driver import FOLDER_DEVICE_FOR_CONFIG
|
||||||
from calibre.devices.kobo.driver import KOBO
|
from calibre.devices.kobo.driver import KOBO
|
||||||
|
|
||||||
@ -600,6 +600,7 @@ plugins += [
|
|||||||
GEMEI,
|
GEMEI,
|
||||||
VELOCITYMICRO,
|
VELOCITYMICRO,
|
||||||
PDNOVEL_KOBO,
|
PDNOVEL_KOBO,
|
||||||
|
LUMIREAD,
|
||||||
ITUNES,
|
ITUNES,
|
||||||
]
|
]
|
||||||
plugins += [x for x in list(locals().values()) if isinstance(x, type) and \
|
plugins += [x for x in list(locals().values()) if isinstance(x, type) and \
|
||||||
|
@ -174,3 +174,33 @@ class GEMEI(USBMS):
|
|||||||
EBOOK_DIR_MAIN = 'eBooks'
|
EBOOK_DIR_MAIN = 'eBooks'
|
||||||
SUPPORTS_SUB_DIRS = True
|
SUPPORTS_SUB_DIRS = True
|
||||||
|
|
||||||
|
class LUMIREAD(USBMS):
|
||||||
|
name = 'Acer Lumiread Device Interface'
|
||||||
|
gui_name = 'Lumiread'
|
||||||
|
description = _('Communicate with the Acer Lumiread')
|
||||||
|
author = 'Kovid Goyal'
|
||||||
|
supported_platforms = ['windows', 'osx', 'linux']
|
||||||
|
|
||||||
|
# Ordered list of supported formats
|
||||||
|
FORMATS = ['epub', 'pdf', 'mobi', 'chm', 'txt', 'doc', 'docx', 'rtf']
|
||||||
|
|
||||||
|
VENDOR_ID = [0x1025]
|
||||||
|
PRODUCT_ID = [0x048d]
|
||||||
|
BCD = [0x323]
|
||||||
|
|
||||||
|
EBOOK_DIR_MAIN = EBOOK_DIR_CARD_A = 'books'
|
||||||
|
SUPPORTS_SUB_DIRS = True
|
||||||
|
|
||||||
|
THUMBNAIL_HEIGHT = 200
|
||||||
|
|
||||||
|
def upload_cover(self, path, filename, metadata, filepath):
|
||||||
|
if metadata.thumbnail and metadata.thumbnail[-1]:
|
||||||
|
cfilepath = filepath.replace('/', os.sep)
|
||||||
|
cfilepath = cfilepath.replace(os.sep+'books'+os.sep,
|
||||||
|
os.sep+'covers'+os.sep, 1)
|
||||||
|
pdir = os.path.dirname(cfilepath)
|
||||||
|
if not os.exists(pdir):
|
||||||
|
os.makedirs(pdir)
|
||||||
|
with open(cfilepath+'.jpg', 'wb') as f:
|
||||||
|
f.write(metadata.thumbnail[-1])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user