From 643d02c2cd8b07b1cc5d2e1c061935d0db068154 Mon Sep 17 00:00:00 2001 From: Remy Date: Thu, 11 Aug 2011 18:23:27 -0700 Subject: [PATCH] Fixed debug message error in postprocessor --- headphones/postprocessor.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/headphones/postprocessor.py b/headphones/postprocessor.py index c7cb7e23..75cb124c 100644 --- a/headphones/postprocessor.py +++ b/headphones/postprocessor.py @@ -120,20 +120,21 @@ def verify(albumid, albumpath): # test #1: metadata - usually works logger.debug('Verifying metadata...') - - metaartist = helpers.latinToAscii(f.artist.lower()).encode('UTF-8') - dbartist = helpers.latinToAscii(release['ArtistName'].lower()).encode('UTF-8') - metaalbum = helpers.latinToAscii(f.album.lower()).encode('UTF-8') - dbalbum = helpers.latinToAscii(release['AlbumTitle'].lower()).encode('UTF-8') - - logger.debug('Matching metadata artist: %s with artist name: %s' % (metaartist, dbartist)) - logger.debug('Matching metadata album: %s with album name: %s' % (metaalbum, dbalbum)) - + for downloaded_track in downloaded_track_list: try: f = MediaFile(downloaded_track) except: continue + + metaartist = helpers.latinToAscii(f.artist.lower()).encode('UTF-8') + dbartist = helpers.latinToAscii(release['ArtistName'].lower()).encode('UTF-8') + metaalbum = helpers.latinToAscii(f.album.lower()).encode('UTF-8') + dbalbum = helpers.latinToAscii(release['AlbumTitle'].lower()).encode('UTF-8') + + logger.debug('Matching metadata artist: %s with artist name: %s' % (metaartist, dbartist)) + logger.debug('Matching metadata album: %s with album name: %s' % (metaalbum, dbalbum)) + if metaartist == dbartist and metaalbum == dbalbum: doPostProcessing(albumid, albumpath, release, tracks, downloaded_track_list) return