This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Get the current position (time) in the playing song in Python

Tags: None
(comma "," separated)
De_Dood
Registered Member
Posts
18
Karma
0
OS
Hello,

I want to write a plugin for amarok to show scrolling lyrics for the song that is currently playing (you know, karaoke style). So I started to write some code in Python. First of I wanted to try to get the current position in the song. This wasn't to hard with DCOP currentTime() but my problem is that the time that this returns is in minutes and seconds but this isn't ecact enough so I need to find a way to get a way to get thet time in minutes, seconds and miliseconds.
I searched the internet for a way but so far without any results.

Can somebody help?

Thanks
User avatar
eean
KDE Developer
Posts
1016
Karma
0
OS
Just added a new DCOP in Amarok, dcop amarok player trackCurrentTimeMs

So its there in the most recent SVN.


Amarok Developer
De_Dood
Registered Member
Posts
18
Karma
0
OS
Thank you verry much!!!

I'll try it out as soon as posible!
De_Dood
Registered Member
Posts
18
Karma
0
OS
Just got the SVN version working without any problems  :smilie:
Now lets start coding  :biggrin:


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]