I'm re-opening this bug (by cloning) because the trackFinished functionality as it stands is pretty useless and I think it should be fixed. The bug was created with this check-in: << commit 01da0b89d2c6ebe705e681110ff0c9abff931400 Author: Alex Merry <kde@randomguy3.me.uk> Date: Sun Jul 12 09:11:34 2009 +0000 randomguy3 does housekeeping part 2c: remove the signals from EngineController , and convert things that used them to EngineObserver. Also, make EngineObserver robust against the EngineSubject being deleted befor e the EngineObserver. svn path=/trunk/extragear/multimedia/amarok/; revision=995177 >> When the signals were removed from EngineController, some places where EngineController emitted a trackFinished were not replaced by an equivalent call to EngineObserver. I'm not sure that the behavior prior to this for trackFinished was completely correct, which may have led to the confusion in the change of implementation. I think the correct place to do a trackFinished emit is from EngineController::slowAboutToFinish +++ This bug was initially created as a clone of Bug #211685 +++ Hi, in amarok 2.1 the amarok event Amarok.Engine.trackFinished calls my function after the end of each track in the play list (like the name said). Today I tried amarok-nightly, here only after the end of the play list my function will be called. I just need the point at end of the play list for my needs, but would prefer to have a stable behaviour. Could you have a look please? Thanks in advance. Best Regards Rico PS: Script can be downloaded here: http://www.kde-apps.org/content/show.php?content=114274&vote=good&tan=85693468&PHPSESSID=6a7d094101f59512f6d8f7315f9bcfcb
That would be EngineController::slotAboutToFinish, not slowAboutToFinish
Created attachment 41173 [details] Patch from git master as of 02/27 Here is a patch that makes the change suggested.
Thank you for the patch. Please make a merge request on http://gitorious.org/amarok/amarok
Created Merge Request #135 on gitorious for this. Since gitorious seems to be a little buggy, this took a few tries, but the merge request 135 that exists now is correct.
commit c45b37373f1e953e6b420d9ad64a27ae321f47d9 Author: Mark Kretschmann <kretschmann@kde.org> Date: Wed Mar 17 08:48:38 2010 +0100 Add new "trackFinished" scripting function. Reviewed by Leo Franchi and me. Thanks for the patch go to Michael MacDonald <mars@antlersoft.com>. BUG: 227312 diff --git a/ChangeLog b/ChangeLog index 76d54f4..a88e818 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ Amarok ChangeLog VERSION 2.3.1-Beta 1 FEATURES: + * The scripting system now offers a new function for detecting that a + track has finished. Patch by Michael MacDonald <mars@antlersoft.com>. + (BR 227312) * New "CoverBling" applet, which allows to browse your collection in an animated 3D view. Thanks to Manu Wagner <manu.wagner@sfr.fr>. * Support for the new System Tray technology from KDE SC 4.4. This adds