Fixed error handling
This commit is contained in:
parent
e0e1431745
commit
c6080c175c
@ -215,6 +215,8 @@ void MusicClient::notifySongChange(const std::shared_ptr<music::SongInfo>& song)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MusicClient::handle_event_song_ended() {
|
void MusicClient::handle_event_song_ended() {
|
||||||
|
auto playlist = this->playlist();
|
||||||
|
if(playlist) playlist->next();
|
||||||
this->replay_next_song();
|
this->replay_next_song();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,6 +225,8 @@ void MusicClient::handle_event_song_dry() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MusicClient::handle_event_song_replay_failed() {
|
void MusicClient::handle_event_song_replay_failed() {
|
||||||
|
auto playlist = this->playlist();
|
||||||
|
if(playlist) playlist->next();
|
||||||
this->replay_next_song();
|
this->replay_next_song();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -234,5 +238,6 @@ void MusicClient::replay_next_song() {
|
|||||||
this->replay_song(song);
|
this->replay_song(song);
|
||||||
else if(!await_load)
|
else if(!await_load)
|
||||||
playlist->next();
|
playlist->next();
|
||||||
}
|
} else
|
||||||
|
this->replay_song(nullptr);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user