Now Playing Banner
  • I've adapted a script that generates a "Now Playing" banner like this.
    image

    If someone want to have it, I will post it here. But you have to know you'll need a bit PHP Knowledge.
    Post edited by Helmut Müller at 2013-03-09 09:13:22
  • 3 Comments sorted by
  • Yes! Please do.
  • So here it is.

    - Download the attached zip. Unzip and upload it to your webspace.
    - Get the TTF here http://www.abstractfonts.com/search/?q=sf+automaton and here http://www.abstractfonts.com/search/?q=verdana (You can use any TTF you like, but you'll need to change the script accordingly)
    - Upload the TTF in the same folder where banner.php is located
    - Go thru banner.php and change all things to fit your needs. Especially your Artime Server IP!
    - Change the images in images folder. These are the templates for your banners.
    - In ls_lib.liq add the following (change the URL to point to your server):

    def create_banner(m)
      ignore(http.get("http://www.mysite.com/airtime/banner/banner.php?title="^url.encode(m['title'])^"&artist="^url.encode(m['artist'])^""))
    end

    - In ls_script.liq add the line:

    queue = on_metadata(create_banner, queue)

    - Restart Liquidsoap: sudo service airtime-liquidsoap restart

    Now banner.php is called on any metadata update and generate three banners 468x60, 120x120 and 120x240
    247K
  • Vote Up0Vote Down Josh McLainJosh McLain
    Posts: 44Member, Administrator, Sourcefabric Team
    Helmut,

    Thanks for this, it looks great! We've had quite a few other people from the community ask for something like this and it would be great to have somewhere to point them. 

    -Josh