2016-10-25, 11:11
Hi,
I'm developing an addon for playing internet radio streams. Until now I've been using setResolvedURL() on a xbmcgui.ListItem object to start playback, which works fine. However, I want to take advantage of the callback methods provided by the xbmc.Player class, and get around the behaviour where Kodi assumes that all items in a list are to be placed in a playlist.
The stream I'm testing with is http://stream.scahw.com.au/live/buddha_1...ylist.m3u8
I've tried various options to get this work, and I can't find one that is reliable using xbmc.Player().play()
This works fine:
This works sometimes, but two out of three times it fails with a 'Player: skipping unplayable item' entry in the log:
Omitting the listitem argument behaves the same, just without any artwork or info.
This will cause the Kodi GUI to hang, with an eventual 'Exception caught on main loop' error:
Am I doing something wrong? I would expect the first two examples to work the same, but that's not what I'm seeing.
I'm using Kodi 16.1 on Windows 7.
Cheers,
Jon
I'm developing an addon for playing internet radio streams. Until now I've been using setResolvedURL() on a xbmcgui.ListItem object to start playback, which works fine. However, I want to take advantage of the callback methods provided by the xbmc.Player class, and get around the behaviour where Kodi assumes that all items in a list are to be placed in a playlist.
The stream I'm testing with is http://stream.scahw.com.au/live/buddha_1...ylist.m3u8
I've tried various options to get this work, and I can't find one that is reliable using xbmc.Player().play()
This works fine:
Code:
li = make_list_item()
li.setPath(stream_url)
xbmcplugin.setResolvedUrl(handle, True, li)
This works sometimes, but two out of three times it fails with a 'Player: skipping unplayable item' entry in the log:
Code:
li = make_list_item()
xbmc.Player().play(item=stream_url, listitem=li)
This will cause the Kodi GUI to hang, with an eventual 'Exception caught on main loop' error:
Code:
li = make_list_item()
li.setPath(stream_url)
xbmc.Player().play(listitem=li)
Am I doing something wrong? I would expect the first two examples to work the same, but that's not what I'm seeing.
I'm using Kodi 16.1 on Windows 7.
Cheers,
Jon