From 870875ab01d89fd5a4c13074f32691da75e7ee41 Mon Sep 17 00:00:00 2001 From: John Schember Date: Sun, 27 Dec 2009 08:19:51 -0500 Subject: [PATCH 1/2] Fix bug #4313: Add Airis Dbook Device Interface. --- src/calibre/devices/eb600/driver.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/calibre/devices/eb600/driver.py b/src/calibre/devices/eb600/driver.py index 738fcdf375..515fdc0765 100644 --- a/src/calibre/devices/eb600/driver.py +++ b/src/calibre/devices/eb600/driver.py @@ -133,7 +133,7 @@ class ITALICA(EB600): class ECLICTO(EB600): - name = 'eClicto device interface' + name = 'eClicto Device Interface' gui_name = 'eClicto' FORMATS = ['epub', 'pdf', 'txt'] @@ -145,4 +145,13 @@ class ECLICTO(EB600): EBOOK_DIR_MAIN = 'Text' EBOOK_DIR_CARD_A = '' +class Dbook(EB600): + name = 'Airis Dbook Device Interface' + gui_name = 'Airis Dbook' + + FORMATS = ['epub', 'mobi', 'prc', 'fb2', 'html', 'pdf', 'rtf', 'txt'] + + VENDOR_NAME = 'INFINITY' + WINDOWS_MAIN_MEM = 'AIRIS_DBOOK' + WINDOWS_CARD_A_MEM = 'AIRIS_DBOOK' From d6707d0b8f75ebef658111dc575b25c1ec64606c Mon Sep 17 00:00:00 2001 From: John Schember Date: Sun, 27 Dec 2009 15:14:20 -0500 Subject: [PATCH 2/2] Fix bug #4303: Nook thumbnail not sized properly. --- src/calibre/devices/nook/driver.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/calibre/devices/nook/driver.py b/src/calibre/devices/nook/driver.py index 825096d31c..0f1df903f3 100644 --- a/src/calibre/devices/nook/driver.py +++ b/src/calibre/devices/nook/driver.py @@ -41,6 +41,8 @@ class NOOK(USBMS): STORAGE_CARD_VOLUME_LABEL = 'Nook Storage Card' EBOOK_DIR_MAIN = 'my documents' + THUMBNAIL_HEIGHT = 144 + DELETE_EXTS = ['.jpg'] SUPPORTS_SUB_DIRS = True def upload_cover(self, path, filename, metadata): @@ -54,7 +56,6 @@ class NOOK(USBMS): coverdata = metadata.get('cover', None) if coverdata: cover = Image.open(cStringIO.StringIO(coverdata[2])) - cover.thumbnail((96, 144), Image.ANTIALIAS) else: coverdata = open(I('library.png'), 'rb').read() @@ -66,8 +67,8 @@ class NOOK(USBMS): cover.paste(im, ((96-x)/2, (144-y)/2)) draw = ImageDraw.Draw(cover) - draw.text((1, 15), metadata.title) - draw.text((1, 115), ', '.join(metadata.authors)) + draw.text((1, 15), metadata.get('title', _('Unknown')).encode('ascii', 'ignore')) + draw.text((1, 115), metadata.get('authors', _('Unknown')).encode('ascii', 'ignore')) data = cStringIO.StringIO() cover.save(data, 'JPEG')