How to show icon, title when playing online stream?
#1
Please forgive my ignorance if this has been answered elsewhere but I have been struggling with this for a while now. I am on Dharma and writing an add-on for a radio station and the task seems simple: I have a stream url that I can play without problems using
Code:
xbmc.Player().play(url)
The problem is that the player (for example on the home page) only shows the generic loudspeaker icon and the last part of the URL as title. I want to show a .png file in the plugin directory to be shown, and a custom string instead of the URL fragment. I have tried the following:
Code:
liz = xbmcgui.ListItem('MyChannel Livestream', iconImage='icon.png', thumbnailImage='')
liz.setInfo('Audio', infoLabels={'Title': 'MyChannel Livestream', 'Genre': 'Rock'})
xbmc.Player().play(u, liz)
This runs, but neither the title is displayed nor the icon. Instead, the loudspeaker is gone and there is empty space where the icon should be. Using thumbnailImage is equally ineffective. Is there any way to alter the displayed information when playing a livestream?

And, if that is possible, can I (from an add-on script) perodically check something and change the "currently playing" info?

Cheers,
Chris
Reply
#2
hi,

what's "u" in your code, for icon, you have to specify the full path / url to the image.

yes you can change a listitem by a script.
Reply
#3
The 'u' is the string containing the full URL of the audio stream. As I said, it plays fine and the player is not the problem but what is displayed while playing.
Reply
#4
here is the way i use:

Code:
video = get_video_url(url)
        playableVideoItem = xbmcgui.ListItem( video["titre"] , path = video["link"] )
        playableVideoItem.setThumbnailImage(video["image"])
        print "###%s###" % video["link"]
        xbmc.Player().play( video["link"] , playableVideoItem , False )

i think you miss to put the path in your item.
Reply
#5
Thanks folks, the icon is now sorted out by using an absolute path, determined via os.getcwd().

HOWEVER, the title or "now playing" is still at its ugly default which is the last part of the played URL. The strings in the ListItem and infoLabels are completely ignored. Any hints?
Reply
#6
post your code
Reply
#7
Almost the same code as in the first post. 'u' contains the URL to play. Playing works, icon is displayed but no title:
Code:
liz = xbmcgui.ListItem('The title I want to see', iconImage=os.getcwd()+'\icon.png', thumbnailImage=os.getcwd()+'\icon.png', path=u)
liz.setInfo('Audio', infoLabels={'Title': 'The title I want to see', 'Genre': 'Rock'})
xbmc.Player().play(u, liz)
Reply
#8
Anyone? If that code seems correct I will have to file a bug report because it is clearly not working. I'd like to be at least certain that I am at least on the right track.
Reply

Logout Mark Read Team Forum Stats Members Help
How to show icon, title when playing online stream?0