# Song Metadata Issue

**URL:** <https://discourse.libretime.org/t/song-metadata-issue/201>\
**Category:** Get Help\
**Created:** [November 7, 2018, 7:03am UTC](https://discourse.libretime.org/t/song-metadata-issue/201 "2018-11-07T07:03:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![btonbadger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/btonbadger/32/109_2.png) [@btonbadger](https://discourse.libretime.org/u/btonbadger)\
**Post date:** [November 7, 2018, 7:03am UTC](https://discourse.libretime.org/t/song-metadata-issue/201/1 "2018-11-07T07:03:38Z")

</div>

Hi,

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?

Cheers

BB

---

<div class="post-metadata">

**Author:** ![btonbadger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/btonbadger/32/109_2.png) [@btonbadger](https://discourse.libretime.org/u/btonbadger)\
**Post date:** [November 11, 2018, 11:53am UTC](https://discourse.libretime.org/t/song-metadata-issue/201/2 "2018-11-11T11:53:45Z")

</div>

Hi,

I’ve done some more poking around. It does look like there’s a portion of code in telnetliquidsoap.py 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 🙂

```
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"') % \
            (media['id'],
                    float(media['fade_in']) / 1000,
                    float(media['fade_out']) / 1000,
                    float(media['cue_in']),
                    float(media['cue_out']),
                    media['row_id'],
                    media['replay_gain'])

    # 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
```

---

<div class="post-metadata">

**Author:** ![frecuencialibre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/frecuencialibre/32/102_2.png) [@frecuencialibre](https://discourse.libretime.org/u/frecuencialibre)\
**Post date:** [November 21, 2018, 7:20pm UTC](https://discourse.libretime.org/t/song-metadata-issue/201/3 "2018-11-21T19:20:00Z")

</div>

have you tried editing tracks via the web interface?

 ![Screenshot%20from%202018-11-21%2013-18-40](https://canada1.discourse-cdn.com/flex036/uploads/libretime/original/1X/1de6d676bdb0d2ae6638b150a2b920d5a1a32af4.png)

---

<div class="post-metadata">

**Author:** ![btonbadger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/btonbadger/32/109_2.png) [@btonbadger](https://discourse.libretime.org/u/btonbadger)\
**Post date:** [November 21, 2018, 7:40pm UTC](https://discourse.libretime.org/t/song-metadata-issue/201/4 "2018-11-21T19:40:58Z")

</div>

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/](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.

---

<div class="post-metadata">

**Author:** ![robbt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/robbt/32/15_2.png) [@robbt](https://discourse.libretime.org/u/robbt)\
**Post date:** [November 23, 2018, 2:10pm UTC](https://discourse.libretime.org/t/song-metadata-issue/201/5 "2018-11-23T14:10:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![robbt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/robbt/32/15_2.png) [@robbt](https://discourse.libretime.org/u/robbt)\
**Post date:** [November 28, 2018, 11:19am UTC](https://discourse.libretime.org/t/song-metadata-issue/201/6 "2018-11-28T11:19:54Z")

</div>

This came up in a discussion regarding metadata on the github issue queue so I opened up a [bug issue](https://github.com/LibreTime/libretime/issues/618).
