Skip to content

Commit

Permalink
m3u file:// is root
Browse files Browse the repository at this point in the history
  • Loading branch information
schreibfaul1 committed Apr 10, 2024
1 parent a6779e6 commit 587fa01
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Binary file modified Content_on_SD_Card.zip
Binary file not shown.
12 changes: 10 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,13 @@ void processPlaylist(boolean first) {
connecttohost(_chbuf);
showFileNumber();
}
else if(startsWith(_chbuf, "file://")){ // root
urldecode(_chbuf);
SerialPrintfln("Playlist: " ANSI_ESC_YELLOW "%s", _chbuf + 7);
webSrv.send("SD_playFile=", _chbuf + 7);
if(!f_has_EXTINF) {SD_playFile(_chbuf + 7);}
else {f_has_EXTINF = false; SD_playFile(_chbuf + 7, 0, false);}
}
else {
const char* path = playlistFile.path();
int32_t idx = lastIndexOf(path, '/');
Expand Down Expand Up @@ -3043,8 +3050,9 @@ void loop() {
if(audioIsRunning() && _f_isFSConnected){
_audioCurrentTime = audioGetCurrentTime();
_audioFileDuration = audioGetFileDuration();
SerialPrintfln("AUDIO_FILE: " ANSI_ESC_GREEN "AudioCurrentTime " ANSI_ESC_GREEN "%li, "
ANSI_ESC_GREEN "AudioFileDuration " ANSI_ESC_GREEN "%li", _audioCurrentTime, _audioFileDuration);
SerialPrintfln("AUDIO_FILE: " ANSI_ESC_GREEN "AudioCurrentTime " ANSI_ESC_GREEN "%li:%02lis, "
ANSI_ESC_GREEN "AudioFileDuration " ANSI_ESC_GREEN "%li:%02lis",
_audioCurrentTime / 60, _audioCurrentTime % 60, _audioFileDuration / 60, _audioFileDuration % 60);
}
}
if(_commercial_dur > 0) {
Expand Down

0 comments on commit 587fa01

Please sign in to comment.