Azuracast: Artist/title fields in Now Playing API not being set properly when streamer connected (Rolling 10.3)

Created on 23 Aug 2020  Â·  5Comments  Â·  Source: AzuraCast/AzuraCast

Using Docker installation method
Yes

AzuraCast version
v0.10.3, #e9c79f2 (2020-08-18 4:16) Rolling • Docker • PHP 7.4

Host Operating System
18.04.3

Describe the bug

When a remote streamer is connected, the artist and title metadata fields are not being set properly in the Now Playing API.

I have two Azuracast installations running on two different droplets. One is on the stable 10.3 (v0.10.3, #9811fbb (2020-06-22 4:38)) and the other is on the rolling 10.3 (v0.10.3, #e9c79f2 (2020-08-18 4:16) Rolling). When I stream via Mixxx (with default metadata settings [$artist - $song] to the stable release the artist and title are properly sent to the now playing API:

_note the text field gets parsed into artist and title using the - separator_

"live": {
      "is_live": true,
      "streamer_name": "dvd",
      "broadcast_start": 1598207005
    },
    "now_playing": {
      "elapsed": 26,
      "remaining": 0,
      "sh_id": 80158,
      "played_at": 1598207032,
      "duration": 0,
      "playlist": "",
      "streamer": "dvd",
      "is_request": false,
      "song": {
        "id": "7280567c8d46a08623616d26d1d3a212",
        "text": "Current Joys - Don't Hurt Anyone (Interlude)",
        "artist": "Current Joys",
        "title": "Don't Hurt Anyone (Interlude)",
        "album": "",
        "lyrics": "",
        "art": "https://remote.wxyc.org/static/img/generic_song.jpg",
        "custom_fields": []
      }
    },

But, while simultaneously streaming to the installation on the rolling release you'll see that artist and title values are not properly parsing the metadata string:

_note that the artist field is not set and the title field is set to the same value as the text field_

"live": {
      "is_live": true,
      "streamer_name": "dvd",
      "broadcast_start": 1598207003
    },
    "now_playing": {
      "elapsed": 15,
      "remaining": 0,
      "sh_id": 143520,
      "played_at": 1598207032,
      "duration": 0,
      "playlist": "",
      "streamer": "dvd",
      "is_request": false,
      "song": {
        "id": "7280567c8d46a08623616d26d1d3a212",
        "text": "Current Joys - Don't Hurt Anyone (Interlude)",
        "artist": "",
        "title": "Current Joys - Don't Hurt Anyone (Interlude)",
        "album": "",
        "lyrics": "",
        "art": "https://stream.subpar.fm/static/img/generic_song.jpg",
        "custom_fields": []
      }
    },

To Reproduce

This happens consistently for all remote streamers on my instance that is on the rolling release. This behavior started when I updated Azuracast, though unfortunately I'm not sure which specific commit past the stable 10.3. Note that this issue does not occur for media being played by AutoDJ... it only happens for remote streamers.

I'm not sure if this is an issue in LiquidSoap, or if something has changed about how metadata is passed to NowPlaying.

Expected behavior

Artist and title fields should be set by parsing the metadata string "$artist - $title"

Relevant Logs

Screenshots

You can see the error manifest in the public player for the two different instances (sorry they have two different designs).
Stable 10.3
Screen Shot 2020-08-23 at 2 23 46 PM
Rolling 10.3
Screen Shot 2020-08-23 at 2 23 56 PM

Device(s):

  • Device:
  • OS:
  • Browser:
  • Version:

Additional context

Not a critical bug, but I have some downstream code that is assuming the artist and title fields are set properly in the Now Playing API. For now I've added a hotfix that parses the "text" field instead.

bug in progress

All 5 comments

@dvdokkum Are you broadcasting to Icecast or SHOUTcast?

I'd be interested to see the /status-json.xsl (for Icecast) or /stats (for SHOUTcast) to see where it may be getting this messed up.

Broadcasting via Icecast.

Here's the status json for the 10.3 rolling

{
  "icestats": {
    "admin": "icemaster@localhost",
    "banned_IPs": 0,
    "build": "106-g1be5f2f",
    "host": "stream.subpar.fm",
    "location": "AzuraCast",
    "outgoing_kbitrate": 0,
    "server_id": "Icecast 2.4.0-kh14",
    "server_start": "18/Aug/2020:23:50:57 -0400",
    "stream_kbytes_read": 6754984,
    "stream_kbytes_sent": 1900346,
    "source": {
      "audio_info": "channels=2;samplerate=44100;bitrate=128",
      "bitrate": 128,
      "connected": 432320,
      "genre": "various",
      "incoming_bitrate": 130232,
      "listener_peak": 9,
      "listeners": 0,
      "listenurl": "http://stream.subpar.fm:8000/radio.mp3",
      "metadata_updated": "23/Aug/2020:23:55:16 -0400",
      "outgoing_kbitrate": 0,
      "queue_size": 80248,
      "server_name": "subpar",
      "server_type": "audio/mpeg",
      "server_url": "stream.subpar.fm",
      "stream_start": "18/Aug/2020:23:50:57 -0400",
      "title": "Current Joys - Become the Warm Jets",
      "total_mbytes_sent": 1860,
      "yp_currently_playing": "Current Joys - Become the Warm Jets"
    }
  }
}

and here's the one for the _working_ 10.3 stable

{
  "icestats": {
    "admin": "icemaster@localhost",
    "banned_IPs": 0,
    "build": "106-g1be5f2f",
    "host": "remote.wxyc.org",
    "location": "AzuraCast",
    "outgoing_kbitrate": 0,
    "server_id": "Icecast 2.4.0-kh14",
    "server_start": "04/Aug/2020:01:03:10 -0400",
    "stream_kbytes_read": 94294297,
    "stream_kbytes_sent": 13626,
    "source": [
      {
        "audio_info": "channels=2;samplerate=44100;bitrate=320",
        "bitrate": 320,
        "connected": 1723766,
        "genre": "freeform",
        "incoming_bitrate": 325432,
        "listener_peak": 0,
        "listeners": 0,
        "listenurl": "http://remote.wxyc.org:8010/private.mp3",
        "metadata_updated": "23/Aug/2020:23:59:35 -0400",
        "outgoing_kbitrate": 0,
        "queue_size": 73143,
        "server_name": "test stream",
        "server_type": "audio/mpeg",
        "server_url": "wxyc.org",
        "stream_start": "04/Aug/2020:01:11:15 -0400",
        "title": "Current Joys - Become the Warm Jets",
        "total_mbytes_sent": 0,
        "yp_currently_playing": "Current Joys - Become the Warm Jets"
      },
      {
        "audio_info": "channels=2;samplerate=44100;bitrate=128",
        "bitrate": 128,
        "connected": 1723766,
        "genre": "freeform",
        "incoming_bitrate": 130176,
        "listener_peak": 2,
        "listeners": 0,
        "listenurl": "http://remote.wxyc.org:8010/radio.mp3",
        "metadata_updated": "23/Aug/2020:23:59:35 -0400",
        "outgoing_kbitrate": 0,
        "queue_size": 82756,
        "server_name": "test stream",
        "server_type": "audio/mpeg",
        "server_url": "wxyc.org",
        "stream_start": "04/Aug/2020:01:11:15 -0400",
        "title": "Current Joys - Become the Warm Jets",
        "total_mbytes_sent": 8,
        "yp_currently_playing": "Current Joys - Become the Warm Jets"
      }
    ]
  }
}

@dvdokkum Thank you! It seems that the yp_currently_playing and title fields are the same, and the latest version of the NowPlaying library isn't expecting this to happen and instead expects that in cases like this, both the title and artist fields will be left empty.

For the sake of producing the same expected result, I may end up updating the NowPlaying library to handle it the same in either scenario.

Cool, let me know if there's anything else I can provide. Appreciate all the work you do! Hope to find some time to get a dev environment set up so I can help out one of these days...

@dvdokkum This should be back to the previous way of functioning in the latest update.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Blazedallup picture Blazedallup  Â·  3Comments

hecgua picture hecgua  Â·  3Comments

adamderann picture adamderann  Â·  4Comments

Rafaelrds2017 picture Rafaelrds2017  Â·  3Comments

dpcee30 picture dpcee30  Â·  3Comments