Music Infolabels
#1
Hi,
in the myspace plugin, I have a line that sets the artist and title infolabels:
Code:
liz=xbmcgui.ListItem(song['title'])
liz.setInfo("music",{"artist":song["artist"],"title":song["title"]})

ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=song['durl'],listitem=liz)
Anyway, in the visualisation and the "now playing"-display, it shows the cryptic_filename.mp3 , Is this normal? Is there any way to change this behaviour? Is it a bug or a feature?
Reply
#2
we were just discussing this, not currently. We need a new function similar to listitem.setInfo() but for the Player() object.

Code:
player = xbmc.Player( xbmc.PLAYER_CORE_MPLAYER )
player.setInfo("music",{"artist":song["artist"],"title":song["title"]})
player.play( url )

are you up for it? Smile
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
Nuka1195 Wrote:we were just discussing this, not currently. We need a new function similar to listitem.setInfo() but for the Player() object.

Code:
player = xbmc.Player( xbmc.PLAYER_CORE_MPLAYER )
player.setInfo("music",{"artist":song["artist"],"title":song["title"]})
player.play( url )

are you up for it? Smile

Naah, I don't really like this one. If I implement it as isFolder=True and use the play command in the plugin, it would not be possible any more to add the elements to a playlist. Why doesn't the player use the infolabels?
Reply
#4
An alternative method would be to allow Player.play() to take a listitem object (like I'm 99% sure it does internally).

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
Quote:
Naah, I don't really like this one. If I implement it as isFolder=True and use the play command in the plugin, it would not be possible any more to add the elements to a playlist. Why doesn't the player use the infolabels?

the currently playing file has different infolabels, what happens if you minize a video and scroll thru the list, the infolabels change, what would you have the player do. I didn't say anything about isFolder=True?

JMarshall, That would be nicer, I'll see if I can find anything.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#6
Not sure if I expressed that correctly... When I browse a folder or a plugin folder, XBMC knows about the infolabels. In a plugin, if I set artist and title, it displays this information while browsing. So it would be nice if this information could be passed to the player. I thought this would happen as the player knows about video library information - covers, etc. for example. So I thought this info would be passed to the player on playback start... This is just cosmetic, however I wondered how the information would flow...
And I wonder why this works for Apple Movie trailers. The player displays all the information set in the infolabels. Things are different here for music playback.
Reply
#7
hmm, i don't know, but I'm adding listitem support to the player as we speak.

Edit: when you say AMT works, are you downloading the videos first? It would be the real name then as I save the file with the title of the trailer.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#8
There'll be a difference depending on whether XBMC plays the file directly (i.e. from the listing you give it) or whether the plugin is called to play the file.

If XBMC plays the file directly then the info should already be in the listitem, and thus available to the player.

I'll grab the myspace plugin and have a play.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#9
jmarshall Wrote:If XBMC plays the file directly then the info should already be in the listitem, and thus available to the player.
This is not the case. Thanks for your help, jmarshall. Maybe I did something wrong with the plugin, but I can't figure it out. And it doesn't work i the other music plugins.
Reply
#10
Please use this version as it contains the infolabels:
http://max-server.informatik.uni-bremen....ySpace.rar
Reply
#11
JMarshall fixed your issue in svn
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#12
I seriously love to work with you guys Smile thanks everybody
Reply
#13
Unbehagen Wrote:I seriously love to work with you guys Smile thanks everybody
I second that.. I've been wanting this for two years.

I have implemented my old XM Radio Online Script as a plugin, and this was the one thing I needed to make it look pretty.

I'll release it in the other forum after the next T3CH release, but if you want to try it out to see if it is properly setting info that the player displays, have a download:
http://www.ashleygrant.net/xbmc_plugin/XMRO4XBMC.zip

If you need a login, xm provides free 3 day trials, I believe. Just go to http://xmro.xmradio.com/xstream/index.jsp

Thanks again
Reply
#14
hehe.. Just noticed that this happened 2 years and 1 day after I originally requested the same idea

http://forum.xbmc.org/showthread.php?tid=13672&page=5

Not complaining, just thought it coincidental
Reply

Logout Mark Read Team Forum Stats Members Help
Music Infolabels1