Bug 253822

Summary: stop after current track works only once but remains marked for stop
Product: [Applications] amarok Reporter: Armijn Hemel <armijn>
Component: ShortcutsAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: kdebugs, mcorteel, nhn, ognyan_angelov, ra.ravi.rav, silver.salonen, teo
Priority: NOR    
Version: 2.6-git   
Target Milestone: 2.7   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 2.7

Description Armijn Hemel 2010-10-11 12:27:30 UTC
Version:           2.3.1 (using KDE 4.4.4) 
OS:                Linux

If I tell Amarok to stop after the current track it works great. The track gets marked with the 'stop' icon and Amarok indeed stops after that track. If I replay the track (still being marked with the stop icon) Amarok will not stop, but happily continue playing the next track in the playlist.

Reproducible: Always

Steps to Reproduce:
play a track, choose "stop after current track", wait for track to finish, replay the track.

Actual Results:  
Amarok continued to play from the playlist the second time, even though the track was still marked as "stop after current track"

Expected Results:  
Amarok should stop if a track is still marked as "stop after current track"
Comment 1 Myriam Schweingruber 2010-10-12 16:20:46 UTC
I think this is a display error, as the "stop after current track" marker should disappear once the stop has happened, AFAIUI
Comment 2 Ognyan Angelov 2010-12-06 21:04:11 UTC
Setup:
  Amarok 2.3.2
  KDE 4.4.5
Test Result:
  Confirm.
I tagged target track to stop playing after finish- it does stops after the first playback.
If we play it again it will not stop no matter that it is still tagged with : stop after current track.
Comment 3 Myriam Schweingruber 2010-12-06 21:24:54 UTC
Yes, but that is a display problem: the action only lasts once, then the marker should be removed automatically, which is the actual bug. Changing title accordingly.
Comment 4 Ravi Arora 2010-12-19 07:49:10 UTC
I confirm this in Amarok 2.4 beta. The solution is that the marker should go away, after playing and stopping the track once.
Comment 5 Maxime Corteel 2010-12-21 14:34:55 UTC
Yes, bug is still there in Amarok 2.4 beta.
Comment 6 Myriam Schweingruber 2011-01-24 18:17:02 UTC
*** Bug 264179 has been marked as a duplicate of this bug. ***
Comment 7 Johannes Georgi 2011-02-01 00:55:46 UTC
but the sign should only go away when i continue the playback; before, it is useful to know on which track i stopped....
Comment 8 Silver Salonen 2011-05-30 10:47:17 UTC
Still happens in 2.4.1.
Comment 9 Armijn Hemel 2011-08-17 17:29:45 UTC
it also still happens in 2.4.3
Comment 10 Silver Salonen 2012-06-28 11:55:40 UTC
Still happens in 2.5.0.
Comment 11 Myriam Schweingruber 2012-08-02 11:46:03 UTC
I can't reproduce this in 2.6 rc anymore, closing
Comment 12 Silver Salonen 2012-08-02 12:09:07 UTC
I just tried it with Amarok 2.5.96 and it still happened - after playing the track, the next track got marked as active, but the "stop after playing this track" mark remained on the previous track.
Comment 13 Myriam Schweingruber 2012-08-04 11:52:16 UTC
Very strange, I can't reproduce this here at all, and I was able to reproduce this before the engine changes. Could you eventually try with a new user?
Comment 14 Silver Salonen 2012-11-08 15:13:59 UTC
I tested it with a completely new user and it happens under there too. Also I discovered that it seems to happen only when I set the track to be stopped with keyboard shortcut - if I set it with right click -> "Stop Playing ...", it's OK.

Currently I have Amarok 2.6.40git.1352308249 installed.
Comment 15 Myriam Schweingruber 2012-11-08 23:18:24 UTC
Thank you fr the feedback, changing this to the shortcuts component as it is related to that.
Comment 16 Matěj Laitl 2012-11-26 19:45:32 UTC
Git commit 57e5bf466b364a0e086000b2d24f00e1e336b22e by Matěj Laitl.
Committed on 26/11/2012 at 20:36.
Pushed by laitl into branch 'master'.

PlaylistActions: fix sloppy "stop playing after" API and friends

...plus clean-up some EngineController <-> PlaylistActions interaction
and remove some hackiness like frequent calls to ::repaingPlaylist()

First, I wanted to merge the https://git.reviewboard.kde.org/r/107457/
- but the patch just opened my eyes to a greater flaw in the design of
"stop playing after"... So thanks, V. A. Amarnath - you triggered me
studying the code.
FIXED-IN: 2.7
REVIEW: 107457

M  +1    -0    ChangeLog
M  +15   -18   src/ActionClasses.cpp
M  +3    -3    src/EngineController.cpp
M  +1    -1    src/dbus/mpris1/PlayerHandler.cpp
M  +1    -1    src/dbus/mpris2/MediaPlayer2AmarokExtensions.cpp
M  +42   -35   src/playlist/PlaylistActions.cpp
M  +16   -23   src/playlist/PlaylistActions.h
M  +1    -1    src/playlist/view/PlaylistViewCommon.cpp
M  +2    -9    src/playlist/view/listview/PrettyListView.cpp
M  +5    -2    src/scriptengine/AmarokPlaylistScript.cpp

http://commits.kde.org/amarok/57e5bf466b364a0e086000b2d24f00e1e336b22e