PDA

View Full Version : How to get info on current playing song?


schdeffan
2004-04-08, 12:58
hi,

i use an xbmc version from the beginning of march 2004 (don't know exactly).

there doesn't seem to be a way to get info on the current song xbmc is playing.

@darkie: could you please add a method for this. best would be something like xbmc.player().currentitem() returning an object of class xbmc.playlistitem().

also xbmc.playlistitem().getduration() returns 0 in my version at least for mp3, haven't tried other things, has that been fixed?

i have some knoweledge in embedding a python-interpreter in other applications exporting app-functions as python-modules, and i would do it my self but i don't have the means to compile xbmc.

- stephan

xsintill
2004-04-08, 16:26
darkie while you are at it could it be possible to let scripts run whenever the user wants to shutdown xbmc just like scripts are run whenever xbmc starts up.

darkie
2004-04-09, 16:17
also xbmc.playlistitem().getduration() returns 0 in my version at least for mp3, haven't tried other things, has that been fixed?
nothing wrong with that, with xbmc.playlistitem() you create a new playlistitem with everything set to 0, that is why getduration() returns 0. if you have created a playlist and you use something like playlist[3].getduration() with 0 as a result, then it is a bug :)

muerte
2004-04-09, 23:14
i just had a great idea. we should make a python script that incorporates a web server so that we can put what song/movie is playing within our sig. that would rock.

schdeffan
2004-04-10, 11:17
@darkie, well, thats exactly what heppens. i load a playlist, get sime item on it, lets las pl[7], and getduration() returns 0.

ent
2004-04-10, 11:17
i just had a great idea. we should make a python script that incorporates a web server so that we can put what song/movie is playing within our sig. that would rock.
why not use the xbmc web server? it's probably possible, though a bit unsecure