v0.7.000
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user