mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2024-12-17 02:59:03 +01:00
Reset last played song when playlist is finished
This commit is contained in:
parent
f35bbd89c9
commit
5d6b0fa329
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user