Use inputstream.adaptive for playback (#25)
This commit is contained in:
parent
78bfae2471
commit
121ea8808f
@ -6,6 +6,7 @@
|
|||||||
<import addon="script.module.pysocks" version="1.6.8" optional="true"/>
|
<import addon="script.module.pysocks" version="1.6.8" optional="true"/>
|
||||||
<import addon="script.module.requests" version="2.22.0"/>
|
<import addon="script.module.requests" version="2.22.0"/>
|
||||||
<import addon="script.module.routing" version="0.2.0"/>
|
<import addon="script.module.routing" version="0.2.0"/>
|
||||||
|
<import addon="inputstream.adaptive" version="2.4.3"/>
|
||||||
</requires>
|
</requires>
|
||||||
<extension point="xbmc.python.pluginsource" library="addon_entry.py">
|
<extension point="xbmc.python.pluginsource" library="addon_entry.py">
|
||||||
<provides>video</provides>
|
<provides>video</provides>
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
from __future__ import absolute_import, division, unicode_literals
|
from __future__ import absolute_import, division, unicode_literals
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import xbmc
|
import xbmc
|
||||||
import xbmcaddon
|
import xbmcaddon
|
||||||
import xbmcgui
|
import xbmcgui
|
||||||
@ -200,6 +199,15 @@ def play(stream, title=None, art_dict=None, info_dict=None, prop_dict=None):
|
|||||||
if prop_dict:
|
if prop_dict:
|
||||||
play_item.setProperties(prop_dict)
|
play_item.setProperties(prop_dict)
|
||||||
|
|
||||||
|
# Setup Inputstream Adaptive
|
||||||
|
if kodi_version_major() >= 19:
|
||||||
|
play_item.setProperty('inputstream', 'inputstream.adaptive')
|
||||||
|
else:
|
||||||
|
play_item.setProperty('inputstreamaddon', 'inputstream.adaptive')
|
||||||
|
play_item.setProperty('inputstream.adaptive.manifest_type', 'hls')
|
||||||
|
play_item.setMimeType('application/vnd.apple.mpegurl')
|
||||||
|
play_item.setContentLookup(False)
|
||||||
|
|
||||||
xbmcplugin.setResolvedUrl(routing.handle, True, listitem=play_item)
|
xbmcplugin.setResolvedUrl(routing.handle, True, listitem=play_item)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user