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

Invalid status-json output (SyntaxError: JSON.parse) #74

Open
tyctor opened this issue Oct 4, 2024 · 0 comments
Open

Invalid status-json output (SyntaxError: JSON.parse) #74

tyctor opened this issue Oct 4, 2024 · 0 comments

Comments

@tyctor
Copy link

tyctor commented Oct 4, 2024

Hi

If stream source is sending dash in StreamTitle, like this:

ffprobe http://myradio.cz:8000/test
Input #0, mp3, from 'http://myradio.cz:8000/test':
  Metadata:
    icy-br          : 128
    icy-name        : Radio Test
    icy-pub         : 1
    StreamTitle     :  - 
  Duration: N/A, start: 0.000000, bitrate: 128 kb/s
  Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s

json output on status-json page is not valid JSON (missing quotes around that dash)

{
"audio_info":"channels=2;samplerate=44100;bitrate=128",
"channels":2,
"genre":"various",
"listener_peak":3,
"listeners":0,
"listenurl":"http://myradio.cz:8000/test",
"samplerate":44100,
"server_description":"Test broadcast from MyRadio",
"server_name":"Radio Test",
"server_type":"audio/mpeg",
"stream_start":"Fri, 04 Oct 2024 08:49:25 +0000",
"stream_start_iso8601":"2024-10-04T08:49:25+0000",
"title": - ,
"dummy":null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant