Skip to content

Commit

Permalink
Partly revert: Fix webstream playlist abort when track fails (#276), a…
Browse files Browse the repository at this point in the history
…f0b078 (#285)

Some properties like repeatCurrentTrack, repeatPlaylist, sleepAfterCurrentTrack, sleepAfterPlaylist, saveLastPlayPosition got lost with af0b078

See also https://forum.espuino.de/t/3-bugs-in-audioplayer-cpp-hoerbuchmodus-speichern-der-playposition-sleepafter/2456/3?u=sfields
  • Loading branch information
pitlochry committed Jan 2, 2024
1 parent 45fbbca commit e356d41
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/AudioPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,6 @@ void AudioPlayer_Task(void *parameter) {
Log_Printf(LOGLEVEL_DEBUG, "Free heap: %u", ESP.getFreeHeap());
playbackTimeoutStart = millis();
gPlayProperties.pausePlay = false;
gPlayProperties.repeatCurrentTrack = false;
gPlayProperties.repeatPlaylist = false;
gPlayProperties.sleepAfterCurrentTrack = false;
gPlayProperties.sleepAfterPlaylist = false;
gPlayProperties.saveLastPlayPosition = false;
gPlayProperties.playUntilTrackNumber = 0;
gPlayProperties.trackFinished = false;
gPlayProperties.playlistFinished = false;

Expand Down Expand Up @@ -1011,6 +1005,13 @@ void AudioPlayer_TrackQueueDispatcher(const char *_itemToPlay, const uint32_t _l

gPlayProperties.playMode = _playMode;
gPlayProperties.numberOfTracks = strtoul(*(musicFiles - 1), NULL, 10);
// Set some default-values
gPlayProperties.repeatCurrentTrack = false;
gPlayProperties.repeatPlaylist = false;
gPlayProperties.sleepAfterCurrentTrack = false;
gPlayProperties.sleepAfterPlaylist = false;
gPlayProperties.saveLastPlayPosition = false;
gPlayProperties.playUntilTrackNumber = 0;

#ifdef PLAY_LAST_RFID_AFTER_REBOOT
// Store last RFID-tag to NVS
Expand Down

0 comments on commit e356d41

Please sign in to comment.