Fixed error handling

This commit is contained in:
WolverinDEV 2020-02-02 15:23:34 +01:00
parent e0e1431745
commit c6080c175c

View File

@ -215,6 +215,8 @@ void MusicClient::notifySongChange(const std::shared_ptr<music::SongInfo>& song)
}
void MusicClient::handle_event_song_ended() {
auto playlist = this->playlist();
if(playlist) playlist->next();
this->replay_next_song();
}
@ -223,6 +225,8 @@ void MusicClient::handle_event_song_dry() {
}
void MusicClient::handle_event_song_replay_failed() {
auto playlist = this->playlist();
if(playlist) playlist->next();
this->replay_next_song();
}
@ -234,5 +238,6 @@ void MusicClient::replay_next_song() {
this->replay_song(song);
else if(!await_load)
playlist->next();
}
} else
this->replay_song(nullptr);
}