Thank you
it works !

For now, I have to manually restart the script for the title to be updated.
I would like this to happen automatically, without using a cron job that
runs the script every minute. We have songs that last 2 minutes and other 7
minutes.

Cheers

2016-10-14 16:06 GMT+02:00 Alex LaBranche <a...@dlnetworks.net>:

> the following is a simple example liq script that plays from a txt file
> playlist of audio files, and will fallback to an emergency file if that
> should fail.
>
>
> #!/usr/bin/liquidsoap
>
> set("harbor.bind_addr”,”127.0.0.1”)
>
> emergency = single(“/fullpath/to/some/file.mp3")
> playlist = playlist(“/fullpath/to/some/playlist.txt")
> source = fallback(track_sensitive=false,[playlist,emergency])
>
> x = insert_metadata(source)
> insert = fst(x)
> source = snd(x)
> def set_meta(~protocol,~data,~headers,uri) =
>     x = url.split(uri)
>     meta = metadata.export(snd(x))
>     ret =
> if meta != [] then
>     insert(meta)
>     “OK”
> else
>     "No metadata to add!"
>     end
>     http_response(protocol=protocol,code=200,headers=[("
> Content-Type","text/html")],data="<html><body><b>#{ret}</
> b></body></html>”)
> end
>
> harbor.http.register(port=8080,method="GET","/setmeta",set_meta)
>
> output.shoutcast(%mp3,name=“Stream Name",genre=“Genre",url="http:
> //www.domain.com",host=“ 127.0.0.1",port=8000,password=“hackme”,source)
> output.icecast(%aac,name=“Stream Name",description=“
> Description",genre=“Genre",url="http://www.domain.com";,
> user=“username",host=“ 127.0.0.1",port=8010,password=“
> hackme",mount=“/stream”,source)
>
>
> the above will allow you to set the metadata on any server liquidsoap
> outputs to by listening for an http GET request on port 8080.
>
> visiting the following url in your browser, or with curl would set the now
> playing title to “Artist - Track Name"
>
> http://127.0.0.1:8080/setmeta?title=Artist%20-%20Track%20Name
>
>
> a simple shell script that will set the now playing title using the value
> from http://www.urban-radio.com/titrage/title_winmedia.html
>
> #!/bin/bash
>
> # get the value from the internets
> title=$(curl -s http://www.urban-radio.com/titrage/title_winmedia.html |
> head -1);
>
> # set the metadata via liquidsoap
> curl -s -G "http://127.0.0.1:8080/setmeta"; --data-urlencode “title=$
> title”;
>
>
> let me know if you have any questions
>
> cheers
>
> DL
>
>
> On Oct 14, 2016, at 3:41 AM, Lyonel Bernard <lyonel.bern...@gmail.com>
> wrote:
>
>
> Hello,
>
> I just put in place, the side of the automation software, sending the
> current title:
> http://www.urban-radio.com/titrage/title_winmedia.html
>
> I want to know how to send their information via Liquidsoap, to Icecast
> and TuneIn?
>
>
> Best regards
>
> -------
>
> Bonjour,
>
> Je viens de mettre en place, du coté du logiciel d'automation, l'envoi du
> titre en cours : http://www.urban-radio.com/titrage/title_winmedia.html
> Je voudrais savoir comment faire pour envoyer ses informations, via
> Liquidsoap, vers Icecast et TuneIn ?
>
> Cordialement
>
>
> Le 10 octobre 2016 à 14:14, Lyonel Bernard <lyonel.bern...@gmail.com> a
> écrit :
> Bonjour,
>
> Je souhaite que liquidsoap récupère le titre et l'artiste en cours diffusé
> par le logiciel d'automation et l'envoi vers Icecast, TuneIn et Twitter.
> Que ces données soient mises à jour dès que le titre diffusé change.
>
> Merci pour ta réponse
>
> Le 8 octobre 2016 à 22:43, Romain Beauxis <to...@rastageeks.org> a écrit :
> Salut!
>
> Est-ce que tu veux ajouter des metadata la demande ou au debut du flux?
>
> Romain
>
> Le 6 octobre 2016 à 05:00, Lyonel Bernard <lyonel.bern...@gmail.com> a
> écrit :
> > Bonjour à tous,
> >
> > Plus à l'aise avec le français qu'avec l'anglais, je me permet ce post
> dans
> > ma langue maternelle.
> >
> > Je test actuellement Liquidsoap depuis un Raspberry Pi. Tout fonctionne
> pour
> > l'audio, mais je bloque pour l'ajout des metadata.
> > Mon logiciel d'automation génère une url contenant les informations
> %artist
> > et %title :
> > http://user;passw...@domain.tld:port/admin/metadata?mount=
> /point-de-montage&charset=UTF-8&mode=updinfo&song=donnees
> > Mais je ne pas comment l'intégrer à Liquidsoap pour pouvoir ajouter les
> > metadata à mon flux et à Icecast.
> > j'ai regardé du coté de "set metadata" mais je cherche le code à ajouter
> à
> > mon fichier de configuration pour liquidsoap.
> >
> > Merci
> >
> > -------------
> > Hello everyone, I currently test Liquidsoap from a Raspberry Pi.
> Everything
> > works for audio, but I block for adding metadata. My automation software
> > generates a URL containing information %artist and %title:
> > http://user;passw...@domain.tld:port/admin/metadata?mount=
> /point-de-montage&charset=UTF-8&mode=updinfo&song=donnees
> > But I do not how to integrate Liquidsoap to add metadata to my feed and
> > Icecast. I looked at the side of "set metadata" but I look for the code
> to
> > add to my config file for liquidsoap. Thank you
> >
> > ------------------------------------------------------------
> ------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Savonet-users mailing list
> > Savonet-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/savonet-users
> >
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Savonet-users mailing list
> Savonet-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot______
> _________________________________________
> Savonet-users mailing list
> Savonet-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Savonet-users mailing list
> Savonet-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to