live-info - where can this query be modified?
  • I've had this posted in the wrong discussion form for a while, and only noticed it today... yikes! Luckily, nothing time critical here....

    I'm looking to add a widget to my website which will show the next 5-10 tracks coming up for playout on our Airtime server. Web server and Airtime server are on 2 different machines, 2 different IPs. To be clear, I understand that songs/files within a larger podcast-type mp3 file are not possible to see, but we label our pudcasts in a certain way, and that information (the metadata for the podcast) is what I want. This is what is stored in the Airtime postgres database (I assume). Currently, I have semi-hacked the live-info system that is in the example widgets, and am using that to the best of my ability as follows:

    I've managed to
    set up a cron job which copies over the live-info file from the airtime
    server over to our web server. AFAIK, the ice cast server info provided
    is not what I'm looking for. 

    the live-info
    file that is created on request has three main entries which tell me
    what tracks are playing out (previous, current and next). My question is
    simple. Where do I find the source of this code, so that I can add
    'next1, next2 and next3' for example, to capture the information of the 3
    next tracks in the play out queue. This has got to be a simple database
    query, I just can't find it, and there is no documentation that I've
    been able to find to help me get there. 

    this capability allows me to ignore short PSA/SID type play out files,
    in favour of songs or podcast titles. No one accessing our website wants
    to know what PSA or SID is playing next, but they might be interested
    in what song is 2 tracks after the next two PSAs...  Also, this would allow me to expand the search to perhaps the last 10 files played out, etc...

    looking forward to an Airtime developer answering this, I just need to
    know where the hooks are and I can likely do the rest.


  • 4 Comments sorted by
  • /usr/share/airtime/application/controllers/ApiController.php
    No longer using Airtime or Libretime.
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Dave, John is right that ApiController.php is the first place to look if you want to modify or add new API actions. The format of API requests is explained in:



  • Thanks guys! I'm looking forward to digging into this!
  • Elsewhere in the forum (hacks I think) about extended widget - you might find some of my code useful.

    No longer using Airtime or Libretime.