[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [Amarok] f99654f: Fix always playing first track when adding tracks
From: Nikolaj Hald Nielsen <nhnFreespirit () gmail ! com>
Date: 2010-07-12 22:05:36
Message-ID: 20100712220536.61323BC04A9 () projects ! kde ! org
[Download RAW message or body]
commit f99654fcacd7e0ebdf8f0b0a3e8be1d4ea4b00f2
Author: Nikolaj Hald Nielsen <nhnFreespirit@gmail.com>
Date: Mon Jul 12 23:44:08 2010 +0200
Fix always playing first track when adding tracks to empty playlist with random \
mode on Thanks to Anton Gritsay <anton@angri.ru> for another fine patch! :-)
BUG: 240452
diff --git a/src/playlist/PlaylistController.cpp \
b/src/playlist/PlaylistController.cpp index 5cc007a..d38c9d6 100644
--- a/src/playlist/PlaylistController.cpp
+++ b/src/playlist/PlaylistController.cpp
@@ -25,6 +25,7 @@
#define DEBUG_PREFIX "Playlist::Controller"
+#include "amarokconfig.h"
#include "core/support/Debug.h"
#include "DirectoryLoader.h"
#include "EngineController.h"
@@ -150,8 +151,13 @@ Playlist::Controller::insertOptioned( Meta::TrackList list, int \
options )
if ( ( engineState == Phonon::StoppedState ) || ( engineState == \
Phonon::LoadingState ) || ( engineState == Phonon::PausedState) ) playNow = true;
- if ( playNow )
- Actions::instance()->play( topModelInsertRow );
+ if ( playNow ) {
+ if ( AmarokConfig::trackProgression() == \
AmarokConfig::EnumTrackProgression::RandomTrack || + \
AmarokConfig::trackProgression() == AmarokConfig::EnumTrackProgression::RandomAlbum ) \
+ Actions::instance()->play(); + else
+ Actions::instance()->play( topModelInsertRow );
+ }
emit changed();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic