mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 12:16:12 +00:00
Fix unicode error once and for all
Turns out to keep a variable that's unicode and keep working with that variable as unicode, need to do unicode(variable). Reincoding using .encode('utf-8') is not the same!! Added extra logging for the future to help debug direct play.
This commit is contained in:
parent
cdde5ce5ea
commit
2aefab1545
1 changed files with 5 additions and 1 deletions
|
@ -313,11 +313,15 @@ class PlayUtils():
|
||||||
|
|
||||||
path = result[u'Path']
|
path = result[u'Path']
|
||||||
# Verify the device has access to the direct path
|
# Verify the device has access to the direct path
|
||||||
if os.path.exists(path.encode('utf-8')) == True:
|
if os.path.exists(unicode(path)) == True:
|
||||||
|
# Local or Network path
|
||||||
|
self.logMsg("Path exists.", 2)
|
||||||
return True
|
return True
|
||||||
elif ":\\" not in path:
|
elif ":\\" not in path:
|
||||||
# Give benefit of the doubt for nfs protocol
|
# Give benefit of the doubt for nfs protocol
|
||||||
# Does not behave with os.path.exists
|
# Does not behave with os.path.exists
|
||||||
|
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)
|
||||||
return False
|
return False
|
Loading…
Reference in a new issue