[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/multimedia/amarok/src/playlist
From: Nikolaj Hald Nielsen <nhnFreespirit () gmail ! com>
Date: 2009-07-16 21:02:30
Message-ID: 1247778150.349328.25100.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 998029 by nhnielsen:
Make the playlist "unactivate" the last played track when it reaches the end (as \
defined by the current navigator). This allows pressing play later on to start the \
playlist from the top (or whereever the navigator thinks it should start) and not \
just keep playing the last played track.
BUG: 176445
M +16 -0 PlaylistActions.cpp
--- trunk/extragear/multimedia/amarok/src/playlist/PlaylistActions.cpp #998028:998029
@@ -83,10 +83,13 @@
void
Playlist::Actions::requestNextTrack()
{
+ DEBUG_BLOCK
if ( m_nextTrackCandidate != 0 )
return;
if( m_trackError )
return;
+
+ debug() << "so far so good!";
m_trackError = false;
m_currentTrack = Model::instance()->activeId();
if ( stopAfterMode() == StopAfterQueue && m_currentTrack == m_trackToBeLast )
@@ -96,6 +99,19 @@
}
m_nextTrackCandidate = m_navigator->requestNextTrack();
+
+ if( m_nextTrackCandidate == 0 )
+ {
+
+ debug() << "nothing more to play...";
+ //no more stuff to play. make sure to reset the active track so that
+ //pressing play will start at the top of the playlist ( or whereever the \
navigator wants to start ) + //instead of just replaying the last track.
+
+ Model::instance()->setActiveRow( -1 );
+ return;
+ }
+
m_currentTrack = m_nextTrackCandidate;
if ( stopAfterMode() == StopAfterCurrent ) //stop after current / stop after \
track starts here
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic