This commit is contained in:
Kovid Goyal 2010-10-08 13:44:59 -06:00
commit 524312e14e

View File

@ -259,6 +259,8 @@ class ITUNES(DriverBase):
self.report_progress(1.0, _('Updating device metadata listing...')) self.report_progress(1.0, _('Updating device metadata listing...'))
# Add new books to booklists[0] # Add new books to booklists[0]
# Charles thinks this should be
# for new_book in metadata[0]:
for new_book in locations[0]: for new_book in locations[0]:
if DEBUG: if DEBUG:
self.log.info(" adding '%s' by '%s' to booklists[0]" % self.log.info(" adding '%s' by '%s' to booklists[0]" %
@ -1208,6 +1210,10 @@ class ITUNES(DriverBase):
except: except:
self.problem_titles.append("'%s' by %s" % (metadata.title, metadata.author[0])) self.problem_titles.append("'%s' by %s" % (metadata.title, metadata.author[0]))
self.log.error(" error scaling '%s' for '%s'" % (metadata.cover,metadata.title)) self.log.error(" error scaling '%s' for '%s'" % (metadata.cover,metadata.title))
import traceback
traceback.print_exc()
return thumb return thumb
if isosx: if isosx:
@ -2400,7 +2406,7 @@ class ITUNES(DriverBase):
try: try:
storage_path = os.path.split(cached_book['lib_book'].location().path) storage_path = os.path.split(cached_book['lib_book'].location().path)
if cached_book['lib_book'].location().path.startswith(self.iTunes_media) and \ if cached_book['lib_book'].location().path.startswith(self.iTunes_media) and \
not storage_path[0].startswith(self.calibre_library_path): not storage_path[0].startswith(prefs['library_path']):
title_storage_path = storage_path[0] title_storage_path = storage_path[0]
if DEBUG: if DEBUG:
self.log.info(" removing title_storage_path: %s" % title_storage_path) self.log.info(" removing title_storage_path: %s" % title_storage_path)
@ -2452,7 +2458,7 @@ class ITUNES(DriverBase):
if book: if book:
if self.iTunes_media and path.startswith(self.iTunes_media) and \ if self.iTunes_media and path.startswith(self.iTunes_media) and \
not path.startswith(self.calibre_library_path): not path.startswith(prefs['library_path']):
storage_path = os.path.split(path) storage_path = os.path.split(path)
if DEBUG: if DEBUG:
self.log.info(" removing '%s' at %s" % self.log.info(" removing '%s' at %s" %