Fixed (hopefully) the isfile unicode error

This commit is contained in:
Remy
2011-08-19 15:44:53 -07:00
parent 666214ea02
commit ec8a5e1bc3

View File

@@ -12,7 +12,7 @@ def libraryScan(dir=None):
tracks = myDB.select('SELECT Location, TrackID from tracks WHERE Location IS NOT NULL')
for track in tracks:
if not os.path.isfile(track['Location']):
if not os.path.isfile(track['Location'].encode(headphones.SYS_ENCODING)):
myDB.action('UPDATE tracks SET Location=? WHERE TrackID=?', [None, track['TrackID']])
if not dir: