mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Merge remote-tracking branch 'refs/remotes/origin/master' into develop
This commit is contained in:
commit
15ac7fd0ca
3 changed files with 10 additions and 28 deletions
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="plugin.video.emby"
|
<addon id="plugin.video.emby"
|
||||||
name="Emby"
|
name="Emby"
|
||||||
version="2.2.14"
|
version="2.2.15"
|
||||||
provider-name="Emby.media">
|
provider-name="Emby.media">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.1.0"/>
|
<import addon="xbmc.python" version="2.1.0"/>
|
||||||
|
|
|
@ -250,7 +250,7 @@
|
||||||
<string id="33008">Enter password for user:</string>
|
<string id="33008">Enter password for user:</string>
|
||||||
<string id="33009">Invalid username or password</string>
|
<string id="33009">Invalid username or password</string>
|
||||||
<string id="33010">Failed to authenticate too many times</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="33012">Direct play failed 3 times. Enabled play from HTTP.</string>
|
||||||
<string id="33013">Choose the audio stream</string>
|
<string id="33013">Choose the audio stream</string>
|
||||||
<string id="33014">Choose the subtitles stream</string>
|
<string id="33014">Choose the subtitles stream</string>
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
#################################################################################################
|
#################################################################################################
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
import xbmc
|
import xbmc
|
||||||
import xbmcgui
|
import xbmcgui
|
||||||
import xbmcvfs
|
import xbmcvfs
|
||||||
|
@ -84,8 +86,6 @@ class PlayUtils():
|
||||||
|
|
||||||
def isDirectPlay(self):
|
def isDirectPlay(self):
|
||||||
|
|
||||||
dialog = xbmcgui.Dialog()
|
|
||||||
|
|
||||||
# Requirement: Filesystem, Accessible path
|
# Requirement: Filesystem, Accessible path
|
||||||
if settings('playFromStream') == "true":
|
if settings('playFromStream') == "true":
|
||||||
# User forcing to play via HTTP
|
# User forcing to play via HTTP
|
||||||
|
@ -125,30 +125,12 @@ class PlayUtils():
|
||||||
# Verify the path
|
# Verify the path
|
||||||
if not self.fileExists():
|
if not self.fileExists():
|
||||||
log("Unable to direct play.", 1)
|
log("Unable to direct play.", 1)
|
||||||
try:
|
log(self.directPlay(), 1)
|
||||||
count = int(settings('failCount'))
|
xbmcgui.Dialog().ok(
|
||||||
except ValueError:
|
heading=lang(29999),
|
||||||
count = 0
|
line1=lang(33011),
|
||||||
log("Direct play failed: %s times." % count, 1)
|
line2=(self.directPlay()))
|
||||||
|
sys.exit()
|
||||||
if count < 2:
|
|
||||||
# Let the user know that direct play failed
|
|
||||||
settings('failCount', value=str(count+1))
|
|
||||||
dialog.notification(
|
|
||||||
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
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue