2023-05-09, 11:17
Hi,
I would like to make a simple kodi addon that just plays a simple .m3u8 link, there is no problem with the installation, but when I start the addon it does nothing and the error is not logged
does anyone have any idea what I'm doing wrong?
thanks in advance!
I would like to make a simple kodi addon that just plays a simple .m3u8 link, there is no problem with the installation, but when I start the addon it does nothing and the error is not logged
does anyone have any idea what I'm doing wrong?
thanks in advance!
python:#addon.xml file
<addon id="plugin.video.play_test" name="play_test" version="0.0.1" provider-name="asd">
<extension point="xbmc.python.pluginsource" library="main.py"></extension>
</addon>
#main.py file
import xbmcaddon
import xbmcgui
import xbmcplugin
import urllib.parse
import sys
addon = xbmcaddon.Addon()
def play_video(url):
xbmcplugin.setResolvedUrl(handle=int(sys.argv[1]), succeeded=True, listitem=xbmcgui.ListItem(path=url))
params = {'url': 'https://....m3u8_link'}
video = {'title': 'Test Video', 'url': params['url']}
url = sys.argv[0] + '?action=play&title=' + urllib.parse.quote(video['title']) + '&url=' + urllib.parse.quote(video['url'])
play_video(video['url'])