Song Metadata Issue


Running Libretime instance on Ubuntu 16.04.4 LTS, Liquidsoap 1.1.1, all working great apart from song title metadata to shoutcast/icecast.

From my experiments it looks like Libretime uses the Artist/Title info embedded into the audio file for the shoutcast stream, which is fine if you have an MP3 library but mine is based on linear wavs for the highest quality and so I end up with no metadata at all.

Is there a way of adjusting it to take the Artist - Title info from the Libretime database entry for that file rather than the embedded metadata?




I’ve done some more poking around. It does look like there’s a portion of code in which looks like it should override the media metadata with that from the Libretime Library. I am trying to understand what this code does, my python knowledge isn’t great but I’ll try :slight_smile:

def create_liquidsoap_annotation(media):
    # We need liq_start_next value in the annotate. That is the value that controls overlap duration of crossfade.

    filename = media['dst']
    annotation = ('annotate:media_id="%s",liq_start_next="0",liq_fade_in="%s",' + \
            'liq_fade_out="%s",liq_cue_in="%s",liq_cue_out="%s",' + \
            'schedule_table_id="%s",replay_gain="%s dB"') % \
                    float(media['fade_in']) / 1000,
                    float(media['fade_out']) / 1000,

    # Override the the artist/title that Liquidsoap extracts from a file's metadata
    # with the metadata we get from Airtime. (You can modify metadata in Airtime's library,
    # which doesn't get saved back to the file.)
    if 'metadata' in media:

        if 'artist_name' in media['metadata']:
            artist_name = media['metadata']['artist_name']
            if isinstance(artist_name, str):
                annotation += ',artist="%s"' % (artist_name.replace('"', '\\"'))
        if 'track_title' in media['metadata']:
            track_title =  media['metadata']['track_title']
            if isinstance(track_title, str):
                annotation += ',title="%s"' % (track_title.replace('"', '\\"'))

    annotation += ":" + filename

    return annotation

have you tried editing tracks via the web interface?

Yes all tracks (wav files) have entries visible in the title and creator field when editing.

The metadata shows correctly when using the api (http://servername/api/live-info/) it just doesn’t make it to the audio stream (except if there’s an ID3 tag on an mp3).

As a workaround I am taking the data from the API.

So this would seem like a bug that could be opened up on git. If it isn’t successful in terms of pulling the metadata from the LibreTime website when it says that it should be doing that. This also makes it clear that the design was for the metadata to not be updated on the tracks when it is updated on the website. I’m not sure I agree with this decision but at least we can confirm that this wasn’t a bug in the minds of the original authors of the software.

This came up in a discussion regarding metadata on the github issue queue so I opened up a bug issue.