Bug 77055 - random mode: first track not random
Summary: random mode: first track not random
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 0.9
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-09 01:33 UTC by Damir Perisa
Modified: 2006-06-11 12:32 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 Damir Perisa 2004-03-09 01:33:34 UTC
Version:           0.9 (using KDE 3.2.0, Arch Linux)
Compiler:          gcc version 3.3.3
OS:          Linux (i686) release 2.6.3

having a playlist amarok loads it on startup (good thing)

but when i then press play (random mode enabled), the first track in playlist is played, and then the random mode starts selecting new ones

should: the first track should be also selected randomly from the whole playlist
Comment 1 Christian Muehlhaeuser 2004-03-20 00:36:09 UTC
fixed in cvs...
Comment 2 Seb Ruiz 2004-08-16 08:39:47 UTC
I am still having this problem in amarok-CVS 1.1, which was not present in amarok 1.0.1
Comment 3 Leo 2004-09-16 14:15:00 UTC
I also have this problem in cvs.
In my opinion a _must_ fix for amaroK 1.1
Comment 4 Damir Perisa 2004-09-16 14:38:06 UTC
i'm using 1.0.2 now, and it has this bug too - didn't have time to check the actual cvs, but if you say it has, i'm going to reopen it
Comment 5 Damir Perisa 2004-09-16 14:38:46 UTC
reopen because of comment #3
Comment 6 Max Howell 2004-09-18 00:02:47 UTC
CVS commit by mhowell: 

Make the first track that is played be random if random mode is on.

CCMAIL: 77055-done@bugs.kde.org


  M +7 -1      playlist.cpp   1.287


--- kdeextragear-1/amarok/src/playlist.cpp  #1.286:1.287
@@ -437,5 +437,11 @@ void
 Playlist::playCurrentTrack()
 {
-    activate( currentTrack() ? currentTrack() : *MyIt( this ) );
+    if ( !currentTrack() )
+        playNextTrack();
+
+    //we must do this even if the above is correct
+    //since the engine is not loaded the first time the user presses play
+    //then calling the next() function wont play it
+    activate( currentTrack() );
 }