diff --git a/src/calibre/devices/apple/driver.py b/src/calibre/devices/apple/driver.py index d8af3bac4b..315c47c4ce 100644 --- a/src/calibre/devices/apple/driver.py +++ b/src/calibre/devices/apple/driver.py @@ -1130,6 +1130,7 @@ class ITUNES(DriverBase): metadata[i].uuid)) self.cached_books[this_book.path] = { 'author': authors_to_string(metadata[i].authors), + 'authors': metadata[i].authors, 'dev_book': db_added, 'format': format, 'lib_book': lb_added, @@ -1176,6 +1177,7 @@ class ITUNES(DriverBase): metadata[i].uuid)) self.cached_books[this_book.path] = { 'author': authors_to_string(metadata[i].authors), + 'authors': metadata[i].authors, 'dev_book': db_added, 'format': format, 'lib_book': lb_added, @@ -1393,21 +1395,18 @@ class ITUNES(DriverBase): db_added = None lb_added = None - # If using iTunes_local_storage, copy the file, redirect iTunes to use local copy - if not self.settings().extra_customization[self.USE_ITUNES_STORAGE]: - local_copy = os.path.join(self.iTunes_local_storage, str(metadata.uuid) + os.path.splitext(fpath)[1]) - shutil.copyfile(fpath, local_copy) - fpath = local_copy - if self.manual_sync_mode: ''' - Unsupported direct-connect mode. + DC mode. Add to iBooks only. ''' db_added = self._add_device_book(fpath, metadata) - lb_added = self._add_library_book(fpath, metadata) - if not lb_added and DEBUG: - logger().warn(" failed to add '%s' to iTunes, iTunes Media folder inaccessible" % metadata.title) else: + # If using iTunes_local_storage, copy the file, redirect iTunes to use local copy + if not self.settings().extra_customization[self.USE_ITUNES_STORAGE]: + local_copy = os.path.join(self.iTunes_local_storage, str(metadata.uuid) + os.path.splitext(fpath)[1]) + shutil.copyfile(fpath, local_copy) + fpath = local_copy + lb_added = self._add_library_book(fpath, metadata) if not lb_added: raise UserFeedback("iTunes Media folder inaccessible", @@ -3118,7 +3117,7 @@ class ITUNES(DriverBase): def _wait_for_writable_metadata(self, db_added, delay=2.0): ''' - Ensure iDevice metadata is writable. Direct connect mode only + Ensure iDevice metadata is writable. DC mode only ''' if DEBUG: logger().info(" %s._wait_for_writable_metadata()" % self.__class__.__name__)