Further revisions after chaley's patch to library.save_to_disk:find_plugboard(). Fixes #783229

This commit is contained in:
GRiker 2011-05-19 06:40:57 -06:00
parent 654d55c349
commit fa3f01c950

View File

@ -941,7 +941,7 @@ class ITUNES(DriverBase):
# declared in use_plugboard_ext and a device name of ITUNES # declared in use_plugboard_ext and a device name of ITUNES
if DEBUG: if DEBUG:
self.log.info("ITUNES.set_plugboard()") self.log.info("ITUNES.set_plugboard()")
#self.log.info(' using plugboard %s' % plugboards) #self.log.info(' plugboard: %s' % plugboards)
self.plugboards = plugboards self.plugboards = plugboards
self.plugboard_func = pb_func self.plugboard_func = pb_func
@ -1052,7 +1052,6 @@ class ITUNES(DriverBase):
'title': metadata[i].title, 'title': metadata[i].title,
'uuid': metadata[i].uuid } 'uuid': metadata[i].uuid }
# Report progress # Report progress
if self.report_progress is not None: if self.report_progress is not None:
self.report_progress((i+1)/file_count, _('%d of %d') % (i+1, file_count)) self.report_progress((i+1)/file_count, _('%d of %d') % (i+1, file_count))
@ -2744,7 +2743,7 @@ class ITUNES(DriverBase):
# Update metadata from plugboard # Update metadata from plugboard
# If self.plugboard is None (no transforms), original metadata is returned intact # If self.plugboard is None (no transforms), original metadata is returned intact
metadata_x = self._xform_metadata_via_plugboard(metadata, this_book.format) metadata_x = self._xform_metadata_via_plugboard(metadata, this_book.format)
self.log("metadata.title_sort: %s metadata_x.title_sort: %s" % (metadata.title_sort, metadata_x.title_sort))
if isosx: if isosx:
if lb_added: if lb_added:
lb_added.name.set(metadata_x.title) lb_added.name.set(metadata_x.title)
@ -2983,6 +2982,9 @@ class ITUNES(DriverBase):
newmi.publisher if book.publisher != newmi.publisher else '')) newmi.publisher if book.publisher != newmi.publisher else ''))
self.log.info(" tags: %s %s" % (book.tags, ">>> %s" % self.log.info(" tags: %s %s" % (book.tags, ">>> %s" %
newmi.tags if book.tags != newmi.tags else '')) newmi.tags if book.tags != newmi.tags else ''))
else:
self.log(" matching plugboard not found")
else: else:
newmi = book newmi = book
return newmi return newmi