cc-4105: Forcing unicode on paths. Added tests for metadata (unicode related)

This commit is contained in:
Rudi Grinberg 2012-07-20 10:21:10 -04:00
parent 5d875c5020
commit 349c6f61f6
3 changed files with 13 additions and 5 deletions

View file

@ -92,6 +92,9 @@ def truncate_to_length(item, length):
class Metadata(Loggable):
def __init__(self, fpath):
# Forcing the unicode through
try: fpath = fpath.decode("utf-8")
except: pass
try: full_mutagen = mutagen.File(fpath, easy=True)
except Exception: raise BadSongFile(fpath)
self.path = fpath