2015-04-05, 04:03
I would like to create an addon for my channel that simply launches the HLS stream, no need for navigation or selection since there is only one stream.
I'm having trouble understanding where to start. I installed and modified the hello world example, but can't figure out what I need to include in the addon.py to launch the m3u8 stream.
This is what I have tried:
I'm having trouble understanding where to start. I installed and modified the hello world example, but can't figure out what I need to include in the addon.py to launch the m3u8 stream.
This is what I have tried:
Code:
import sys
import xbmcgui
import xbmcplugin
addon_handle = int(sys.argv[1])
xbmcplugin.setContent(addon_handle, 'movies')
url = 'http://www.myserver.com/playlist.m3u8'
li = xbmcgui.ListItem('My First Video!', iconImage='DefaultVideo.png')
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)
xbmcplugin.endOfDirectory(addon_handle)