mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Nook driver: Scan for ebooks in the entire main memory, not just under My Files
This commit is contained in:
parent
6ad8c353ee
commit
c1451ad966
@ -27,7 +27,7 @@ class NOOK(USBMS):
|
|||||||
# Ordered list of supported formats
|
# Ordered list of supported formats
|
||||||
FORMATS = ['epub', 'pdb', 'pdf']
|
FORMATS = ['epub', 'pdb', 'pdf']
|
||||||
|
|
||||||
VENDOR_ID = [0x2080, 0x18d1] # 0x18d1 is for softrooted nook
|
VENDOR_ID = [0x2080, 0x18d1] # 0x18d1 is for softrooted nook
|
||||||
PRODUCT_ID = [0x001]
|
PRODUCT_ID = [0x001]
|
||||||
BCD = [0x322]
|
BCD = [0x322]
|
||||||
|
|
||||||
@ -53,7 +53,6 @@ class NOOK(USBMS):
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
import Image, ImageDraw
|
import Image, ImageDraw
|
||||||
|
|
||||||
|
|
||||||
coverdata = getattr(metadata, 'thumbnail', None)
|
coverdata = getattr(metadata, 'thumbnail', None)
|
||||||
if coverdata and coverdata[2]:
|
if coverdata and coverdata[2]:
|
||||||
cover = Image.open(cStringIO.StringIO(coverdata[2]))
|
cover = Image.open(cStringIO.StringIO(coverdata[2]))
|
||||||
@ -87,12 +86,13 @@ class NOOK_COLOR(NOOK):
|
|||||||
|
|
||||||
PRODUCT_ID = [0x002, 0x003, 0x004]
|
PRODUCT_ID = [0x002, 0x003, 0x004]
|
||||||
if isosx:
|
if isosx:
|
||||||
PRODUCT_ID.append(0x005) # Nook HD+
|
PRODUCT_ID.append(0x005) # Nook HD+
|
||||||
BCD = [0x216]
|
BCD = [0x216]
|
||||||
|
|
||||||
WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['EBOOK_DISK', 'NOOK_TABLET',
|
WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['EBOOK_DISK', 'NOOK_TABLET',
|
||||||
'NOOK_SIMPLETOUCH']
|
'NOOK_SIMPLETOUCH']
|
||||||
EBOOK_DIR_MAIN = 'My Files'
|
EBOOK_DIR_MAIN = 'My Files'
|
||||||
|
# SCAN_FROM_ROOT = True
|
||||||
NEWS_IN_FOLDER = False
|
NEWS_IN_FOLDER = False
|
||||||
|
|
||||||
def upload_cover(self, path, filename, metadata, filepath):
|
def upload_cover(self, path, filename, metadata, filepath):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user