- Aggiornato Anavids

- Fix m3u8 non supportati da inputstream
This commit is contained in:
Alhaziel01
2021-10-21 19:26:55 +02:00
parent 3f55c94662
commit 40d8501afc
6 changed files with 20 additions and 10 deletions

View File

@@ -992,7 +992,7 @@ def play_video(item, strm=False, force_direct=False, autoplay=False):
return
# we get the selected video
mediaurl, view, mpd = get_video_seleccionado(item, seleccion, video_urls, autoplay)
mediaurl, view, mpd, hls = get_video_seleccionado(item, seleccion, video_urls, autoplay)
if not mediaurl: return
# video information is obtained.
@@ -1012,7 +1012,7 @@ def play_video(item, strm=False, force_direct=False, autoplay=False):
xlistitem.setProperty("inputstream.adaptive.license_type", item.drm)
xlistitem.setProperty("inputstream.adaptive.license_key", item.license)
xlistitem.setMimeType('application/dash+xml')
elif item.manifest == 'hls' or (mediaurl.split('|')[0].endswith('m3u8') and mediaurl.startswith('http')):
elif hls or item.manifest == 'hls':# or (mediaurl.split('|')[0].endswith('m3u8') and mediaurl.startswith('http')):
if not install_inputstream():
return
xlistitem.setProperty('inputstream' if PY3 else 'inputstreamaddon', 'inputstream.adaptive')
@@ -1321,6 +1321,7 @@ def get_video_seleccionado(item, seleccion, video_urls, autoplay=False):
view = False
wait_time = 0
mpd = False
hls = False
# You have chosen one of the videos
if seleccion < len(video_urls):
@@ -1340,6 +1341,8 @@ def get_video_seleccionado(item, seleccion, video_urls, autoplay=False):
if 'mpd' in video_urls[seleccion][0]:
mpd = True
if 'hls' in video_urls[seleccion][0]:
hls = True
# If there is no mediaurl it is because the video is not there :)
logger.debug("mediaurl=" + mediaurl)
@@ -1355,7 +1358,7 @@ def get_video_seleccionado(item, seleccion, video_urls, autoplay=False):
if not continuar:
mediaurl = ""
return mediaurl, view, mpd
return mediaurl, view, mpd, hls
def set_player(item, xlistitem, mediaurl, view, strm):