mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Fix calibre not getting list of books on the Fire
This commit is contained in:
parent
33f9908100
commit
5701c1990a
@ -388,13 +388,9 @@ class KINDLE_FIRE(KINDLE2):
|
|||||||
|
|
||||||
EBOOK_DIR_MAIN = 'Documents'
|
EBOOK_DIR_MAIN = 'Documents'
|
||||||
SUPPORTS_SUB_DIRS = False
|
SUPPORTS_SUB_DIRS = False
|
||||||
|
SCAN_FROM_ROOT = True
|
||||||
|
SUPPORTS_SUB_DIRS_FOR_SCAN = True
|
||||||
VENDOR_NAME = 'AMAZON'
|
VENDOR_NAME = 'AMAZON'
|
||||||
WINDOWS_MAIN_MEM = 'KINDLE'
|
WINDOWS_MAIN_MEM = 'KINDLE'
|
||||||
|
|
||||||
def get_main_ebook_dir(self, for_upload=False):
|
|
||||||
if for_upload:
|
|
||||||
return self.EBOOK_DIR_MAIN
|
|
||||||
return ''
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,6 +28,8 @@ class DeviceConfig(object):
|
|||||||
EXTRA_CUSTOMIZATION_DEFAULT = None
|
EXTRA_CUSTOMIZATION_DEFAULT = None
|
||||||
|
|
||||||
SUPPORTS_SUB_DIRS = False
|
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
|
MUST_READ_METADATA = False
|
||||||
SUPPORTS_USE_AUTHOR_SORT = False
|
SUPPORTS_USE_AUTHOR_SORT = False
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ class USBMS(CLI, Device):
|
|||||||
debug_print('USBMS: scan from root', self.SCAN_FROM_ROOT, ebook_dir)
|
debug_print('USBMS: scan from root', self.SCAN_FROM_ROOT, ebook_dir)
|
||||||
if not os.path.exists(ebook_dir): continue
|
if not os.path.exists(ebook_dir): continue
|
||||||
# Get all books in the ebook_dir directory
|
# 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
|
# build a list of files to check, so we can accurately report progress
|
||||||
flist = []
|
flist = []
|
||||||
for path, dirs, files in os.walk(ebook_dir):
|
for path, dirs, files in os.walk(ebook_dir):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user