Music Infolabels

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Unbehagen Offline
Skilled Python Coder
Posts: 347
Joined: Jul 2007
Reputation: 4
Location: Bremen, Germany
Post: #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?
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #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/
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 347
Joined: Jul 2007
Reputation: 4
Location: Bremen, Germany
Post: #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?
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #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: badge.gif]
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #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/
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 347
Joined: Jul 2007
Reputation: 4
Location: Bremen, Germany
Post: #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.
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #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/
(This post was last modified: 2007-09-21 00:12 by Nuka1195.)
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #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: badge.gif]
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 347
Joined: Jul 2007
Reputation: 4
Location: Bremen, Germany
Post: #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.
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 347
Joined: Jul 2007
Reputation: 4
Location: Bremen, Germany
Post: #10
Please use this version as it contains the infolabels:
http://max-server.informatik.uni-bremen....ySpace.rar
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #11
JMarshall fixed your issue in svn

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 347
Joined: Jul 2007
Reputation: 4
Location: Bremen, Germany
Post: #12
I seriously love to work with you guys Smile thanks everybody
find quote
NewNole2001 Offline
Junior Member
Posts: 48
Joined: Sep 2005
Reputation: 0
Post: #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
find quote
NewNole2001 Offline
Junior Member
Posts: 48
Joined: Sep 2005
Reputation: 0
Post: #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
find quote