From 69afa8071599fa3149ef0f50b9ed488087218226 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 9 Nov 2017 08:50:08 +0530 Subject: [PATCH] Fix #1731024 [New BN Nook Glowlight 3 not recognized](https://bugs.launchpad.net/calibre/+bug/1731024) --- src/calibre/devices/nook/driver.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/calibre/devices/nook/driver.py b/src/calibre/devices/nook/driver.py index 9100990ee7..bb6d7fe4dc 100644 --- a/src/calibre/devices/nook/driver.py +++ b/src/calibre/devices/nook/driver.py @@ -12,7 +12,8 @@ import os import cStringIO -from calibre import fsync +from calibre import fsync, prints +from calibre.constants import DEBUG from calibre.devices.usbms.driver import USBMS @@ -104,6 +105,15 @@ class NOOK_COLOR(NOOK): def upload_cover(self, path, filename, metadata, filepath): pass + def post_open_callback(self): + product_id = self.device_being_opened[1] + if DEBUG: + prints('Opened NOOK with product id:', product_id) + if product_id == 0xb: + if DEBUG: + prints('Setting Nook upload directory to NOOK') + self.EBOOK_DIR_MAIN = 'NOOK' + def get_carda_ebook_dir(self, for_upload=False): if for_upload: return self.EBOOK_DIR_MAIN