diff --git a/src/calibre/devices/hanlin/driver.py b/src/calibre/devices/hanlin/driver.py index f19135a7e7..3db55d05c5 100644 --- a/src/calibre/devices/hanlin/driver.py +++ b/src/calibre/devices/hanlin/driver.py @@ -119,22 +119,25 @@ class BOOX(HANLINV3): MAIN_MEMORY_VOLUME_LABEL = 'BOOX Internal Memory' STORAGE_CARD_VOLUME_LABEL = 'BOOX Storage Card' - EBOOK_DIR_MAIN = ['MyBooks'] - EXTRA_CUSTOMIZATION_MESSAGE = _('Comma separated list of directories to ' - 'send e-books to on the device. The first one that exists will ' - 'be used.') + EBOOK_DIR_MAIN = ['MyBooks', 'MyBooks'] + EXTRA_CUSTOMIZATION_MESSAGE = _('Directories to send e-books to on the device. ' + 'The first directory is used for main memory. ' + 'The second is used for cards.') EXTRA_CUSTOMIZATION_DEFAULT = ', '.join(EBOOK_DIR_MAIN) - # EBOOK_DIR_CARD_A = 'MyBooks' ## Am quite sure we need this. - def post_open_callback(self): opts = self.settings() dirs = opts.extra_customization if not dirs: dirs = self.EBOOK_DIR_MAIN else: + # will have at least one item ... dirs = [x.strip() for x in dirs.split(',')] - self.EBOOK_DIR_MAIN = dirs + self.EBOOK_DIR_MAIN = dirs[0] + if len(dirs) > 1: + self.EBOOK_DIR_CARD_A = self.EBOOK_DIR_CARD_B = dirs[1] + else: + self.EBOOK_DIR_CARD_A = self.EBOOK_DIR_CARD_B = dirs[0] def windows_sort_drives(self, drives): return drives diff --git a/src/calibre/devices/usbms/driver.py b/src/calibre/devices/usbms/driver.py index 1a088cc77c..73a329be58 100644 --- a/src/calibre/devices/usbms/driver.py +++ b/src/calibre/devices/usbms/driver.py @@ -58,7 +58,7 @@ class USBMS(CLI, Device): debug_print ('USBMS: Fetching list of books from device. oncard=', oncard) - dummy_bl = booklist_class(None, None, None) + dummy_bl = self.booklist_class(None, None, None) if oncard == 'carda' and not self._card_a_prefix: self.report_progress(1.0, _('Getting list of books on device...')) @@ -78,6 +78,8 @@ class USBMS(CLI, Device): self.EBOOK_DIR_CARD_B if oncard == 'cardb' else \ self.get_main_ebook_dir() + debug_print ('USBMS: dirs are:', prefix, ebook_dirs) + # get the metadata cache bl = self.booklist_class(oncard, prefix, self.settings) need_sync = self.parse_metadata_cache(bl, prefix, self.METADATA_CACHE) diff --git a/src/calibre/gui2/dialogs/config/add_save.ui b/src/calibre/gui2/dialogs/config/add_save.ui index 35824ef847..9ded5d91c2 100644 --- a/src/calibre/gui2/dialogs/config/add_save.ui +++ b/src/calibre/gui2/dialogs/config/add_save.ui @@ -6,7 +6,7 @@ 0 0 - 588 + 599 516 @@ -200,7 +200,7 @@ Title match ignores leading indefinite articles ("the", "a", - Choose 'Manual Management', to have Calibre update the metadata cache (not the book) and add collections when a book is sent. With this option, calibre will never remove a collection. Choose 'Calibre manages metadata when sending books' to have Calibre update the metadata cache and add/remove collections when you send a book to the device. Choose 'Calibre manages metadata when device is connected' to have Calibre update the metadata cache and add/remove collections when you connect the device. + Choose 'Manual Management', to have Calibre update the metadata cache (not the book) and add collections when a book is sent. With this option, calibre will never remove a collection. Choose 'Calibre manages metadata when sending books' to have Calibre update the metadata cache and add/remove collections for a book when it is sent to the device. Choose 'Calibre manages metadata when device is connected' to have Calibre update the metadata cache and add/remove collections when calibre connects to the device and when you send a book. Qt::PlainText