Merge remote-tracking branch 'refs/remotes/origin/master' into develop

This commit is contained in:
angelblue05 2016-07-04 14:22:24 -05:00
commit 15ac7fd0ca
3 changed files with 10 additions and 28 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.emby"
name="Emby"
version="2.2.14"
version="2.2.15"
provider-name="Emby.media">
<requires>
<import addon="xbmc.python" version="2.1.0"/>

View File

@ -250,7 +250,7 @@
<string id="33008">Enter password for user:</string>
<string id="33009">Invalid username or password</string>
<string id="33010">Failed to authenticate too many times</string>
<string id="33011">Unable to direct play</string>
<string id="33011">Unable to direct play file</string>
<string id="33012">Direct play failed 3 times. Enabled play from HTTP.</string>
<string id="33013">Choose the audio stream</string>
<string id="33014">Choose the subtitles stream</string>

View File

@ -2,6 +2,8 @@
#################################################################################################
import sys
import xbmc
import xbmcgui
import xbmcvfs
@ -84,8 +86,6 @@ class PlayUtils():
def isDirectPlay(self):
dialog = xbmcgui.Dialog()
# Requirement: Filesystem, Accessible path
if settings('playFromStream') == "true":
# User forcing to play via HTTP
@ -125,30 +125,12 @@ class PlayUtils():
# Verify the path
if not self.fileExists():
log("Unable to direct play.", 1)
try:
count = int(settings('failCount'))
except ValueError:
count = 0
log("Direct play failed: %s times." % count, 1)
if count < 2:
# Let the user know that direct play failed
settings('failCount', value=str(count+1))
dialog.notification(
log(self.directPlay(), 1)
xbmcgui.Dialog().ok(
heading=lang(29999),
message=lang(33011),
icon="special://home/addons/plugin.video.emby/icon.png",
sound=False)
elif settings('playFromStream') != "true":
# Permanently set direct stream as true
settings('playFromStream', value="true")
settings('failCount', value="0")
dialog.notification(
heading=lang(29999),
message=lang(33012),
icon="special://home/addons/plugin.video.emby/icon.png",
sound=False)
return False
line1=lang(33011),
line2=(self.directPlay()))
sys.exit()
return True