2009-08-12, 08:02
Hi all, I am trying to create one playlist in python and then play it, but it doesn't seem to work. The worst thing is that I don't get any error messages so I don't know what is wrong.
Here is the script:
This just loads two items into playlist and then starts a player, but player doesn't start.
I also tried just to play one of those streams without adding it to playlist, and that worked ok:
Can somebody tell me what am I doing wrong in first script?
Here is the script:
Code:
import xbmc, xbmcgui
xbmc.PlayList(1).clear()
listitem = xbmcgui.ListItem('Slovenija 1',
thumbnailImage='/home/iskratel/logo_tvslovenija1.jpg')
url = 'udp://@227.111.2.10:12345'
xbmc.PlayList(1).add(url, listitem)
listitem = xbmcgui.ListItem('Slovenija 2',
thumbnailImage='/home/iskratel/logo_tvslovenija2.jpg')
url = 'udp://@227.111.2.11:12345'
xbmc.PlayList(1).add(url, listitem)
xbmc.Player().play()
This just loads two items into playlist and then starts a player, but player doesn't start.
I also tried just to play one of those streams without adding it to playlist, and that worked ok:
Code:
listitem = xbmcgui.ListItem('Slovenija 2',
thumbnailImage='/home/iskratel/logo_tvslovenija2.jpg')
url = 'udp://@227.111.2.11:12345'
xbmc.Player().play(url, listitem)
Can somebody tell me what am I doing wrong in first script?