Bug 210610 - Amarok 2.2.0: Repeat Track doesn't work if Random is enabled
Summary: Amarok 2.2.0: Repeat Track doesn't work if Random is enabled
Status: RESOLVED DUPLICATE of bug 178056
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 2.2.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-15 00:56 UTC by Michal Ziabkowski
Modified: 2009-10-15 19:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Ziabkowski 2009-10-15 00:56:19 UTC
Version:           2.2.0 (using 4.3.2 (KDE 4.3.2), Gentoo)
Compiler:          i686-pc-linux-gnu-gcc
OS:                Linux (i686) release 2.6.31-gentoo-r2

Steps to reproduce:
1) Enable Playlist/Random (either Tracks or Albums)
2) Enable Plalist/Repeat/Track
3) Click Next

Result:
Amarok skips to a random track, ignoring the Repeat Track option.

Expected result:
Amarok repeats the current track. This is how it worked in 1.x, anyway.

Qt: 4.5.3
KDE: 4.3.2 (KDE 4.3.2)
Comment 1 Myriam Schweingruber 2009-10-15 01:34:57 UTC

*** This bug has been marked as a duplicate of bug 178056 ***
Comment 2 Michal Ziabkowski 2009-10-15 17:59:02 UTC
Ah, sorry about the dupe. Anyway, I made something like this:

--- src/playlist/PlaylistActions.cpp	2009-10-15 02:36:36.083025219 +0200
+++ src/playlist/PlaylistActions.cpp.new	2009-10-15 02:51:23.451025250 +0200
@@ -275,7 +275,9 @@
     {
         if ( Amarok::randomTracks() )
         {
-            if( Amarok::favorNone() )
+            if( Amarok::repeatTrack() )
+                m_navigator = new RepeatTrackNavigator();
+            else if( Amarok::favorNone() )
                 m_navigator = new RandomTrackNavigator();
             else
                 m_navigator = new FavoredRandomTrackNavigator();

This might not be the optimal approach and I'm not sure what the behaviour for Random + Repeat Album should be. Regardless, at least the Repeat Track + Random combo works as I'd expect it to, giving priority to repeating the track.
Comment 3 Myriam Schweingruber 2009-10-15 19:47:48 UTC
Michael, I copy your comment over to the original bug, comments in a bug marked as duplicate will not be seen by the devs.