× Warning! This forum is in archival status. New contributions may not work.
Song requests in Airtime?
  • Hi, I administrate a radio station where our old system had support for requests of songs.
    We are migrating to airtime and cant find such feature, and we are unsure on how this could be implemented with liquidsoap.

    Any ideas, good sourcefabric community?

    Thanks.
  • 4 Comments sorted by
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    well, you could adopt ls_script.liq for this.
    or create another liq-file and implement it in ls_script.liq
    liquidsoaps documentation on savonet is very helpful.

    or you could go to bugtracker dev.sourcefabric.org and ask for this request or search for a similar and vote for it.

    cheers
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • Hi hoerich,

    I have created a liquid soap script that when launched on its own works well sending the stream to icecast. How do I integrate it within ls_script.liq so that it gets used by airtime? The script is like below and works. when I use the telnet interface and use: 'request.push /home/me/mysong.mp3', the playlist is interrupted and the requested file is played at the specified mount point. But I am lost on how to fuse this into airtime. 
    The script I have is below.
    =========================/script================================================
    #!/usr/bin/liquidsoap
    # Lines starting with # are comments, they are ignored.
    ##I included the libe below so that I have access for functions such as "mksafe" that were not being found.
    %include "/usr/lib/airtime/pypo/bin/liquidsoap_scripts/library/utils.liq"

    # Put the log file in some directory where
    # you have permission to write.
    set("log.file.path","/tmp/<script>.log")
    # Print log messages to the console,
    # can also be done by passing the -v option to liquidsoap.
    set("log.stdout", true)
    # Use the telnet server for requests
    set("server.telnet", true)
    set("server.telnet.port", 1235)

    day     = playlist("/home/goof/playlist.pls")
    radio = fallback([request.queue(id="request"),mksafe(day)])

    # Output the stream to icecast
    output.icecast(%mp3,
      host="localhost",port=8000,password="guest",
      mount="radio",radio)

    Post edited by Katongo Musaluke at 2014-05-08 05:23:33
  • Vote Up0Vote Down Voisses TechVoisses Tech
    Posts: 1,423Member
    You do not want to use telnet over a public network I would hope !

    Instead use request dynamic or request equeue LIKE HOW  
    (line 42- 61) IS USED IN , that way you can send a get next to your script.USE This as an Example


    What I would  do if I wanted to have submit request from the public is

    • simple database with query  for artist,title,year
    • have a php script with a form (http post)
    • when the person submit the form,if their query is successful,it has a get next,if not it inform the person not in queue, but allow then to type and submit,like a contact form.

    If you want to use airtime its easy without need for a script (only disadvantage is that its not put in any queue. you have to do it manually

    1. make a dir to watch ( call it public request)
    2. Have some way to pull the song from you collection (using php or python )  like AIRTIME IMPORT  (http://sourcefabric.booktype.pro/airtime-25-for-broadcasters/using-the-airtime-import-script/)
    3. then just put in your now playing


    Good Luck

    VOISSES


    Post edited by Voisses Tech at 2014-05-10 02:06:43
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Hi Voisses

    Many thanks for the response. Indeed my intention was to use a local script to interact with the server and not open up the telnet port to the internet.

    Both your methods sound great, except I am not so sure what to do to use the lines 42-61 example in ls_script.liq that you have given. Would I need to implement my own "create_source" function similar to the section you have given? That function seems very specific within the script.

    Looks like the best option would be doing it right in Airtime and figure out a way of dynamically loading a playlist from listener selections of our available tracks.

    Thanks

    Anthony