Fixed bug with no_repeate mode, improved prev button behaviour
authorNikolay Tischenko <niktischenko@gmail.com>
Sat, 18 Dec 2010 07:01:03 +0000 (13:01 +0600)
committerNikolay Tischenko <niktischenko@gmail.com>
Sat, 18 Dec 2010 07:01:03 +0000 (13:01 +0600)
src/player/player.cpp

index 59d542b..f62497f 100644 (file)
@@ -134,6 +134,7 @@ void Player::next() {
                if (pos >= _playlist.tracks().count()) {
                        if (_repeat == REPEAT_NO) {
                                stop();
+                               return;
                        }
                        pos %= _playlist.tracks().count();
                }
@@ -166,8 +167,6 @@ void Player::_set_source() {
 
 void Player::prev() {
        if (_history.isEmpty()) {
-               _set_source();
-               play();
                return;
        }
        _queue.push_front(_track);