Fix for post processor hanging when it fails to read one file. Logger fix in embedLyrics to use unicode instead of bytestring

This commit is contained in:
rembo10
2012-10-21 00:00:21 -03:00
parent 90cec8dfc8
commit dd76db450f

View File

@@ -603,6 +603,7 @@ def embedLyrics(downloaded_track_list):
f = MediaFile(downloaded_track)
except:
logger.error('Could not read %s. Not checking lyrics' % downloaded_track.decode(headphones.SYS_ENCODING, 'replace'))
continue
if f.albumartist and f.title:
metalyrics = lyrics.getLyrics(f.albumartist, f.title)
@@ -613,7 +614,7 @@ def embedLyrics(downloaded_track_list):
metalyrics = None
if lyrics:
logger.debug('Adding lyrics to: %s' % downloaded_track)
logger.debug('Adding lyrics to: %s' % downloaded_track.decode(headphones.SYS_ENCODING, 'replace'))
f.lyrics = metalyrics
f.save()