Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Station name "icy-name" is not always present in datastream #450

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4540,6 +4540,7 @@ void handlebyte_ch ( uint8_t b )
metaint = 0 ; // No metaint found
LFcount = 0 ; // For detection end of header
bitrate = 0 ; // Bitrate still unknown
icyname = "" ; // Clear Station name
dbgprint ( "Switch to HEADER" ) ;
setdatamode ( HEADER ) ; // Handle header

Expand Down Expand Up @@ -5199,8 +5200,16 @@ const char* analyzeCmd ( const char* par, const char* val )
}
else
{
sprintf ( reply, "%s - %s", icyname.c_str(),
icystreamtitle.c_str() ) ; // Streamtitle from metadata
if ( icyname != "" ) // Check for station name
{
sprintf ( reply, "%s - %s", icyname.c_str(),
icystreamtitle.c_str() ) ; // Streamtitle from metadata
}
else
{
sprintf ( reply, "%s",
icystreamtitle.c_str() ) ; // Streamtitle from metadata
}
}
}
else if ( argument.startsWith ( "reset" ) ) // Reset request
Expand Down