2
2
MiniWebRadio -- Webradio receiver for ESP32
3
3
4
4
first release on 03/2017
5
- Version 2.4c, Dec 12 /2022
5
+ Version 2.4d, Mar 13 /2022
6
6
7
7
2.8" color display (320x240px) with controller ILI9341 or HX8347D (SPI) or
8
8
3.5" color display (480x320px) wiht controller ILI9486 or ILI9488 (SPI)
@@ -901,11 +901,13 @@ const char* listAudioFile(){
901
901
audioFile.close ();
902
902
return nullptr ;
903
903
}
904
- while (file){
904
+ else {
905
+ if (file.isDirectory ()) return " dir" ;
905
906
strcpy (_chbuf, file.name ());
906
907
if (endsWith (_chbuf, " .mp3" ) || endsWith (_chbuf, " .aac" ) || endsWith (_chbuf, " .m4a" ) ||
907
908
endsWith (_chbuf, " .wav" ) || endsWith (_chbuf, " .flac" )||
908
- endsWith (_chbuf, " .m3u" )){
909
+ endsWith (_chbuf, " .m3u" ) || endsWith (_chbuf, " .opus" )){
910
+
909
911
return _chbuf;
910
912
}
911
913
else {
@@ -923,6 +925,7 @@ bool sendAudioList2Web(const char* audioDir){
923
925
while (true ){
924
926
FileName = listAudioFile ();
925
927
if (!FileName) break ;
928
+ if (strcmp (FileName, " dir" ) == 0 ) continue ;
926
929
jObject[i][" name" ] = (String)FileName;
927
930
i++;
928
931
}
@@ -2120,7 +2123,7 @@ void tp_pressed(uint16_t x, uint16_t y){
2120
2123
if (btnNr == 3 ){_releaseNr = 3 ; } // station--
2121
2124
if (btnNr == 4 ){_releaseNr = 4 ; } // station++
2122
2125
changeBtn_pressed (btnNr); break ;
2123
- case RADIOmenue_1: if (btnNr == 0 ){_releaseNr = 10 ; audioStopSong (); listAudioFile (); } // AudioPlayer
2126
+ case RADIOmenue_1: if (btnNr == 0 ){_releaseNr = 10 ; audioStopSong ();} // AudioPlayer
2124
2127
if (btnNr == 1 ){_releaseNr = 11 ;} // Clock
2125
2128
if (btnNr == 2 ){_releaseNr = 12 ;} // Radio
2126
2129
if (btnNr == 3 ){_releaseNr = 13 ;} // Sleep
0 commit comments