From 236916b8568523439d238bd9be346faea44c160c Mon Sep 17 00:00:00 2001 From: Remy Date: Wed, 17 Aug 2011 02:43:15 -0700 Subject: [PATCH] Unicode bug fix --- headphones/librarysync.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/headphones/librarysync.py b/headphones/librarysync.py index 9a4bdaf6..62c1bc7b 100644 --- a/headphones/librarysync.py +++ b/headphones/librarysync.py @@ -11,11 +11,6 @@ def libraryScan(dir=None): if not dir: dir = headphones.MUSIC_DIR - try: - dir = str(dir) - except UnicodeEncodeError: - dir = unicode(dir).encode('unicode_escape') - logger.info('Scanning music directory: %s' % dir) new_artists = [] @@ -28,7 +23,7 @@ def libraryScan(dir=None): for files in f: # MEDIA_FORMATS = music file extensions, e.g. mp3, flac, etc if any(files.endswith('.' + x) for x in headphones.MEDIA_FORMATS): - file = os.path.join(r, files).decode('utf-8') + file = os.path.join(r, files) # Try to read the metadata try: f = MediaFile(file)