2015-10-25, 06:02
That is my code but it gives me error saying check log because of addon_handle but when I remove it it works but directly plays the url i want to make a list so that when i open the addon it has channels but i get an error please help.
import xbmc, xbmcgui, xbmcaddon, sys, xbmcplugin
addon = xbmcaddon.Addon('plugin.video.sports')
title = addon.getAddonInfo('name')
icon = addon.getAddonInfo('icon')
addon_handle = int(sys.argv[1])
xbmcplugin.setContent(addon_handle, 'movie')
url = 'URL'
li = xbmcgui.ListItem('Sky Sports', iconImage='DefaultVideo.png')
xbmc.Player().play(item=url, listitem=li)
xbmcplugin.endOfDirectory(addon_handle)
import xbmc, xbmcgui, xbmcaddon, sys, xbmcplugin
addon = xbmcaddon.Addon('plugin.video.sports')
title = addon.getAddonInfo('name')
icon = addon.getAddonInfo('icon')
addon_handle = int(sys.argv[1])
xbmcplugin.setContent(addon_handle, 'movie')
url = 'URL'
li = xbmcgui.ListItem('Sky Sports', iconImage='DefaultVideo.png')
xbmc.Player().play(item=url, listitem=li)
xbmcplugin.endOfDirectory(addon_handle)