From e37a55bc079bce5b7d3da44ca382e93e2de8e527 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Tue, 2 Jun 2015 19:22:33 -0500 Subject: [PATCH] Fix unicode path for os.path.exists path.decode('utf-8') does the trick. Fingers crossed. --- resources/lib/PlayUtils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/PlayUtils.py b/resources/lib/PlayUtils.py index 7f7cc224..5d522676 100644 --- a/resources/lib/PlayUtils.py +++ b/resources/lib/PlayUtils.py @@ -318,7 +318,7 @@ class PlayUtils(): try: pathexists = os.path.exists(path) 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 if pathexists: # Local or Network path @@ -330,5 +330,5 @@ class PlayUtils(): self.logMsg("Can't verify path. Still try direct play.", 2) return True 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 \ No newline at end of file