mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
dont auto fall back to http streaming if not selected
Dont fall back to http streaming if direct file playback is expected.
This commit is contained in:
parent
fccda1b9f4
commit
8f0343de2e
3 changed files with 10 additions and 28 deletions
|
@ -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"/>
|
||||
|
|
|
@ -236,7 +236,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>
|
||||
|
|
|
@ -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(
|
||||
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
|
||||
log(self.directPlay(), 1)
|
||||
xbmcgui.Dialog().ok(
|
||||
heading=lang(29999),
|
||||
line1=lang(33011),
|
||||
line2=(self.directPlay()))
|
||||
sys.exit()
|
||||
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in a new issue