2016-02-10, 19:11
(2016-02-10, 12:29)Roman_V_M Wrote: 2 Rapboy
Why are you insisting on using xbmc.Player class? It is meant for different scenarios. But even if you do want to use it, I don't see from your code that you are providing a playable URL to it.
Sorry for the misunderstanding. To be honest I have no interest in using the xbmc.Player class,I am actually just using your example plugin and adjusting it to suit my needs. I used that code as I thought it was simple and can gain a quick response on how to use xbmc.Dialog.
However I am almost certain that my approach is a plugin (your example plugin), i'm just finding it hard to understand how some codes are made up. I am constantly adjusting the code and using kodi.log to help understand the error that is generated, but it is to little avail most of the time. Impressive how you learned programming from scratch with know programming[/code] experience, I doubt I will be the same though.
At the moment I am using the following:
Code:
def play_video(path):
stream_url=[]
stream_name=[]
name= 'name'
links='video'
i=1
for video in links:
stream_url.append( links )
stream_name.append( 'Link '+str(i) )
dialog = xbmcgui.Dialog()
i=i+1
select = dialog.select(name,stream_name)
if select == -1:
quit()
else:
url = stream_url[select]
listitem=xbmcgui.ListItem(name)
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=listitem)
listitem.setPath(path)
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)
But I am finding it difficult to make kodi realise that I want to use the url('s) in the VIDEOS category, as I don't know the code. As always thank you for your input(s).