Skip to content

Commit

Permalink
Bugfix for m3u-playmode with inactive wifi
Browse files Browse the repository at this point in the history
  • Loading branch information
biologist79 committed Oct 4, 2022
1 parent 4f67faa commit 05c1d94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
18 changes: 6 additions & 12 deletions src/AudioPlayer.cpp
Expand Up @@ -1034,19 +1034,13 @@ void AudioPlayer_TrackQueueDispatcher(const char *_itemToPlay, const uint32_t _l
break;
}

case LOCAL_M3U: { // Can be one or more webradio-station(s)
case LOCAL_M3U: { // Can be one or multiple SD-files or webradio-stations; or a mix of both
Log_Println((char *) FPSTR(modeWebstreamM3u), LOGLEVEL_NOTICE);
if (Wlan_IsConnected()) {
xQueueSend(gTrackQueue, &(musicFiles), 0);
#ifdef MQTT_ENABLE
publishMqtt((char *) FPSTR(topicPlaymodeState), gPlayProperties.playMode, false);
publishMqtt((char *) FPSTR(topicRepeatModeState), NO_REPEAT, false);
#endif
} else {
Log_Println((char *) FPSTR(webstreamNotAvailable), LOGLEVEL_ERROR);
System_IndicateError();
gPlayProperties.playMode = NO_PLAYLIST;
}
xQueueSend(gTrackQueue, &(musicFiles), 0);
#ifdef MQTT_ENABLE
publishMqtt((char *) FPSTR(topicPlaymodeState), gPlayProperties.playMode, false);
publishMqtt((char *) FPSTR(topicRepeatModeState), NO_REPEAT, false);
#endif
break;
}

Expand Down
2 changes: 1 addition & 1 deletion src/revision.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_H__
#define __REVISION_H__
constexpr const char softwareRevision[] PROGMEM = "Software-revision: 20221002-1";
constexpr const char softwareRevision[] PROGMEM = "Software-revision: 20221004-1";
#endif

0 comments on commit 05c1d94

Please sign in to comment.