diff --git a/src/core/player.cpp b/src/core/player.cpp index 1a211ca7b..6ac0008d2 100644 --- a/src/core/player.cpp +++ b/src/core/player.cpp @@ -395,6 +395,7 @@ void Player::NextItem(Engine::TrackChangeFlags change) { int i = active_playlist->next_row(ignore_repeat_track); if (i == -1) { app_->playlist_manager()->active()->set_current_row(i); + app_->playlist_manager()->active()->reset_last_played(); emit PlaylistFinished(); Stop(); return; diff --git a/src/playlist/playlist.h b/src/playlist/playlist.h index f364752e3..7011cf0d0 100644 --- a/src/playlist/playlist.h +++ b/src/playlist/playlist.h @@ -189,6 +189,7 @@ class Playlist : public QAbstractListModel { int current_row() const; int last_played_row() const; + void reset_last_played() { last_played_item_index_ = QPersistentModelIndex(); } int next_row(bool ignore_repeat_track = false) const; int previous_row(bool ignore_repeat_track = false) const;