Fix unicode failed playback

Failing due to window prop, doh!
This commit is contained in:
angelblue05 2015-05-10 07:39:16 -05:00
parent f7a65c6763
commit df665343c5

View file

@ -63,7 +63,7 @@ class PlayUtils():
return False return False
else: else:
self.logMsg("File is direct playing.", 1) self.logMsg("File is direct playing.", 1)
WINDOW.setProperty("%splaymethod" % playurl, "DirectPlay") WINDOW.setProperty("%splaymethod" % playurl.encode('utf-8'), "DirectPlay")
except: except:
return False return False
@ -93,7 +93,7 @@ class PlayUtils():
except: except:
return False return False
return playurl return playurl.encode('utf-8')
def isDirectPlay(self, result): def isDirectPlay(self, result):
@ -128,7 +128,7 @@ class PlayUtils():
try: try:
# Item can be played directly # Item can be played directly
playurl = result[u'MediaSources'][0][u'Path'] playurl = result[u'MediaSources'][0][u'Path']
if u'VideoType' in result: if u'VideoType' in result:
# Specific format modification # Specific format modification
if u'Dvd' in result[u'VideoType']: if u'Dvd' in result[u'VideoType']:
@ -150,7 +150,7 @@ class PlayUtils():
if "apple.com" in playurl: if "apple.com" in playurl:
USER_AGENT = 'QuickTime/7.7.4' USER_AGENT = 'QuickTime/7.7.4'
playurl += "?|User-Agent=%s" % USER_AGENT playurl += "?|User-Agent=%s" % USER_AGENT
return playurl return playurl
except: except:
@ -311,7 +311,7 @@ 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')): if os.path.exists(path) == True:
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