Fix unicode path

for os.path.exists path.decode('utf-8') does the trick. Fingers crossed.
This commit is contained in:
angelblue05 2015-06-02 19:22:33 -05:00
parent 073a83f592
commit e37a55bc07

View file

@ -318,7 +318,7 @@ class PlayUtils():
try: try:
pathexists = os.path.exists(path) pathexists = os.path.exists(path)
except UnicodeEncodeError: except UnicodeEncodeError:
pathexists = os.path.exists(path.encode('utf-8')) pathexists = os.path.exists(path.decode('utf-8'))
# Verify the device has access to the direct path # Verify the device has access to the direct path
if pathexists: if pathexists:
# Local or Network path # Local or Network path
@ -330,5 +330,5 @@ class PlayUtils():
self.logMsg("Can't verify path. Still try direct play.", 2) self.logMsg("Can't verify path. Still try direct play.", 2)
return True return True
else: else:
self.logMsg("Path is detected as a Url. Try direct streaming.", 2) self.logMsg("Path is detected as a Url: %s. Try direct streaming." % path, 2)
return False return False