This commit is contained in:
e2002
2022-08-01 12:47:56 +03:00
parent f123c71d04
commit b3e110eae3
22 changed files with 1123 additions and 71 deletions

View File

@@ -1,6 +1,12 @@
void audio_info(const char *info) {
if(config.store.audioinfo) telnet.printf("##AUDIO.INFO#: %s\n", info);
if (strstr(info, "failed!") != NULL || strstr(info, " 404") != NULL) {
#ifdef USE_NEXTION
if (strstr(info, "format is aac") != NULL) nextion.bitratePic(ICON_AAC);
if (strstr(info, "format is flac") != NULL) nextion.bitratePic(ICON_FLAC);
if (strstr(info, "format is mp3") != NULL) nextion.bitratePic(ICON_MP3);
if (strstr(info, "format is wav") != NULL) nextion.bitratePic(ICON_WAV);
#endif
if (strstr(info, "failed!") != NULL || strstr(info, " 404") != NULL || strstr(info, " 403") != NULL || strstr(info, "address is empty") != NULL) {
config.setTitle("[request failed]");
netserver.requestOnChange(TITLE, 0);
player.setOutputPins(false);
@@ -13,8 +19,11 @@ void audio_info(const char *info) {
void audio_bitrate(const char *info)
{
telnet.printf("%s %s\n", "##AUDIO.BITRATE#:", info);
if(config.store.audioinfo) telnet.printf("%s %s\n", "##AUDIO.BITRATE#:", info);
config.station.bitrate = atoi(info) / 1000;
#ifdef USE_NEXTION
nextion.bitrate(config.station.bitrate);
#endif
netserver.requestOnChange(BITRATE, 0);
}