Added logging for Direct play

This commit is contained in:
angelblue05 2015-06-02 16:26:23 -05:00
parent 4cbb648dc4
commit 073a83f592
1 changed files with 3 additions and 0 deletions

View File

@ -106,11 +106,13 @@ class PlayUtils():
playhttp = self.addon.getSetting('playFromStream')
# User forcing to play via HTTP instead of SMB
if playhttp == "true":
self.logMsg("Can't direct play: Play from HTTP is enabled.", 1)
return False
canDirectPlay = result[u'MediaSources'][0][u'SupportsDirectPlay']
# Make sure it's supported by server
if not canDirectPlay:
self.logMsg("Can't direct play: Server does not allow or support it.", 1)
return False
location = result[u'LocationType']
@ -120,6 +122,7 @@ class PlayUtils():
if self.fileExists(result):
return True
else:
self.logMsg("Can't direct play: Unable to locate the content.", 1)
return False