Fix calibre not getting list of books on the Fire

This commit is contained in:
Kovid Goyal 2011-11-19 07:31:43 +05:30
parent 33f9908100
commit 5701c1990a
3 changed files with 5 additions and 7 deletions

View File

@ -388,13 +388,9 @@ class KINDLE_FIRE(KINDLE2):
EBOOK_DIR_MAIN = 'Documents'
SUPPORTS_SUB_DIRS = False
SCAN_FROM_ROOT = True
SUPPORTS_SUB_DIRS_FOR_SCAN = True
VENDOR_NAME = 'AMAZON'
WINDOWS_MAIN_MEM = 'KINDLE'
def get_main_ebook_dir(self, for_upload=False):
if for_upload:
return self.EBOOK_DIR_MAIN
return ''

View File

@ -28,6 +28,8 @@ class DeviceConfig(object):
EXTRA_CUSTOMIZATION_DEFAULT = None
SUPPORTS_SUB_DIRS = False
SUPPORTS_SUB_DIRS_FOR_SCAN = False # This setting is used when scanning for
# books when SUPPORTS_SUB_DIRS is False
MUST_READ_METADATA = False
SUPPORTS_USE_AUTHOR_SORT = False

View File

@ -202,7 +202,7 @@ class USBMS(CLI, Device):
debug_print('USBMS: scan from root', self.SCAN_FROM_ROOT, ebook_dir)
if not os.path.exists(ebook_dir): continue
# Get all books in the ebook_dir directory
if self.SUPPORTS_SUB_DIRS:
if self.SUPPORTS_SUB_DIRS or self.SUPPORTS_SUB_DIRS_FOR_SCAN:
# build a list of files to check, so we can accurately report progress
flist = []
for path, dirs, files in os.walk(ebook_dir):