X-Git-Url: http://git.maemo.org/git/?p=someplayer;a=blobdiff_plain;f=src%2Fplayer%2Fplayer.cpp;h=0f11f9df6e5e705c988ffd5f872ff22dce1da9f9;hp=577a4dc002cd1ea94595657fac1ac2870a7bf1d3;hb=c5dac101a0ecbf2872c00fa48b95f59ce39ef9cf;hpb=75a31c072d4db3f29e6df6f224beebe0f7dfd617 diff --git a/src/player/player.cpp b/src/player/player.cpp index 577a4dc..0f11f9d 100644 --- a/src/player/player.cpp +++ b/src/player/player.cpp @@ -56,6 +56,8 @@ void Player::next() { _history.push(_current % count); if (!_queue.isEmpty()) { _current = _queue.dequeue(); + } else if (!_prev_history.isEmpty()) { + _current = _prev_history.pop(); } else { if (_random) { _current = (count + (qrand() + qrand() + qrand()) % count) % count; @@ -82,7 +84,7 @@ void Player::_set_source() { void Player::prev() { if (_history.count() > 0) { - _queue.push_front(_current); + _prev_history.push(_current); _current = _history.pop(); _track = _playlist.tracks().at(_current); }