Dev-Branch

Inhalt einer M3U Testdatei für WebRadioStations:

http://mp3channels.webradio.antenne.de/antenne
http://orf-live.ors-shoutcast.at/oe3-q2a
http://194.232.200.164:8000/;638826246082377stream.nsv

Bitte einfach die 3 Zeilen z.B. als WebRadio3.m3u in den ESPuino hochladen und über GUI abspielen.

Track Back mehrfach betätigen.
Es wird der rote LED-Ring aufleuchten wenn man auf Station 1 steht und dann aber auf die 2. eingetragene Station gewechselt und abgespielt. Das ist auch über die bauen LEDs ersichtlich (Station 2) bei Station 1 leuchten keine blauen LEDs. Somit wird ständig zw. 1. und 2. Station gewechselt.

Dann im AudioPlayer.cpp den Case: PREVIOUS RACK
durch folgenden ersetzten:

case PREVIOUSTRACK:
                    trackCommand = NO_ACTION;
                    if (gPlayProperties.pausePlay) {
                        audio->pauseResume();
                        gPlayProperties.pausePlay = false;
                    }
                    if (gPlayProperties.repeatCurrentTrack) { // End loop if button was pressed
                        gPlayProperties.repeatCurrentTrack = false;
                        #ifdef MQTT_ENABLE
                            publishMqtt(topicRepeatModeState, AudioPlayer_GetRepeatMode(), false);
                        #endif
                    }
                    if (gPlayProperties.playMode == WEBSTREAM) {
                        Log_Println(trackChangeWebstream, LOGLEVEL_INFO);
                        System_IndicateError();
                        continue;
                    } else if (gPlayProperties.playMode == LOCAL_M3U) {
                        Log_Println(cmndPrevTrack, LOGLEVEL_INFO);
                        if (gPlayProperties.currentTrackNumber > 0) {
                            gPlayProperties.currentTrackNumber--;
                        } else {
                            System_IndicateError();
                            continue;
                        }
                    } else {        
                        if (gPlayProperties.currentTrackNumber > 0 || gPlayProperties.repeatPlaylist) {
                            if (audio->getAudioCurrentTime() < 5) { // play previous track when current track time is small, else play current track again
                                if (gPlayProperties.currentTrackNumber == 0 && gPlayProperties.repeatPlaylist) {
                                    gPlayProperties.currentTrackNumber = gPlayProperties.numberOfTracks - 1;    // Go back to last track in loop-mode when first track is played
                                } else {
                                    gPlayProperties.currentTrackNumber--;
                                }
                            }

                            if (gPlayProperties.saveLastPlayPosition) {
                                AudioPlayer_NvsRfidWriteWrapper(gPlayProperties.playRfidTag, *(gPlayProperties.playlist + gPlayProperties.currentTrackNumber), 0, gPlayProperties.playMode, gPlayProperties.currentTrackNumber, gPlayProperties.numberOfTracks);
                                Log_Println(trackStartAudiobook, LOGLEVEL_INFO);
                            }

                            Log_Println(cmndPrevTrack, LOGLEVEL_INFO);
                            if (!gPlayProperties.playlistFinished) {
                                audio->stopSong();
                            }
                        } else {
                            if (gPlayProperties.saveLastPlayPosition) {
                                AudioPlayer_NvsRfidWriteWrapper(gPlayProperties.playRfidTag, *(gPlayProperties.playlist + gPlayProperties.currentTrackNumber), 0, gPlayProperties.playMode, gPlayProperties.currentTrackNumber, gPlayProperties.numberOfTracks);
                            }
                            audio->stopSong();
                            Led_Indicate(LedIndicatorType::Rewind);
                            audioReturnCode = audio->connecttoFS(gFSystem, *(gPlayProperties.playlist + gPlayProperties.currentTrackNumber));
                            // consider track as finished, when audio lib call was not successful
                            if (!audioReturnCode) {
                                System_IndicateError();
                                gPlayProperties.trackFinished = true;
                                continue;
                            }
                            Log_Println(trackStart, LOGLEVEL_INFO);
                            continue;
                        }
                    }
                    break;

Dann sollte es besser funktionieren.
Ich hoffe, ich habe keinen Testfall übersehen, wo sich die Änderungen unerwünscht auswirken könnten.

1 „Gefällt mir“