![]() ![]()
|
Hi,
I\'d really love to see seekPercent(int percentage) , to skip files without touching their score (i.e. executing dcop amarok player seekPercent 50 && dcop amarok player next). It\'s trivial to implement, but I don\'t know the source well enough to figure out how to get the current track\'s total time. [code] void EngineController::seekPercent( int percentage ) // SLOT { if( m_engine->state() == Engine::Playing ) { int secs = ->trackTotalTime(); // |
![]() ![]()
|
Munched post
*Gngngn*. I hate Web-Forums. I thought the code block would automagically quote chars which could be misinterpreted as HTML. Indeed, it did in the Preview. Instead, half the post got killed. :/ Again without angle brackets... [code:1] void EngineController::«»seekPercent( int percentage ) // SLOT { if( m_engine->state() == Engine::«»Playing ) { int secs = some_object->trackTotalTime(); int newPos = (int) ( secs*percent / 100) + 1; seek(newPos); } } [/code:1] and went on to say that I\'d ask for nextNoScore(), but that I think this is way less trivial. Regards, Mario |
![]() KDE Developer ![]()
|
Having DCOPs dedicated to not changing the score seems silly. Why not just have one DCOP that turns on and off scoring. And you could do a seekPercent just by using two existing DCOPs.
Amarok Developer
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]