Show an error is an internet radio has no sources to load

This commit is contained in:
François-Xavier Thomas
2019-07-02 23:00:03 +02:00
parent 5cb9b6c029
commit afa037611d
3 changed files with 8 additions and 0 deletions
@@ -467,6 +467,12 @@
shuffleRadioEnabled = playQueue.shuffleRadioEnabled;
internetRadioEnabled = playQueue.internetRadioEnabled;
// If an internet radio has no sources, display a message to the user.
if (internetRadioEnabled && songs.length == 0) {
top.main.$().toastmessage("showErrorToast", "<fmt:message key="playlist.toast.radioerror"/>");
onStop();
}
if ($("#start")) {
$("#start").toggle(!playQueue.stopEnabled);
$("#stop").toggle(playQueue.stopEnabled);