[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: extragear/multimedia/amarok/src/playlist
From: Seb Ruiz <ruiz () kde ! org>
Date: 2009-07-16 21:41:37
Message-ID: 60ebdd0b0907161441y62b41088ie3969e1422421a4c () mail ! gmail ! com
[Download RAW message or body]
Did you really need to leave all that rather useless debug in there?
2009/7/17 Nikolaj Hald Nielsen <nhnFreespirit@gmail.com>:
> 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
--
Seb Ruiz
http://www.sebruiz.net/
http://amarok.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic