def playVideo(url, name, type_):
xbmc_busy(False)
pl = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
pl.clear()
if url : #sometimes url is a list of url or just a single string
if isinstance(url, basestring):
pl.add(url, xbmcgui.ListItem(name))
xbmc.Player().play(pl, windowed=False) #scripts play video like this.
#listitem = xbmcgui.ListItem(path=url) #plugins play video like this.
#xbmcplugin.setResolvedUrl(pluginhandle, True, listitem)
else:
for u in url:
#log('u='+ repr(u))
#pl.add(u)
pl.add(u, xbmcgui.ListItem(name))
xbmc.Player().play(pl, windowed=False)
else:
log("playVideo(url) url is blank")
评论列表
文章目录