On Air Today Widget doesn't show all today's shows
  • hi,

    I've updated airtime from version 2.0.3 to 2.1.0

    And now today's list of programs is really short

    The widget can be seen here:
    http://ec2-176-34-206-28.eu-west-1.compute.amazonaws.com/hoje-iframe.html

    the updated information is here (and it only shows 2 programs, though tday there are more programs scheduled):
    http://ec2-176-34-206-28.eu-west-1.compute.amazonaws.com/tmp/airtime-live-info

    It works the same with both widgets (from 2.0.3 and 2.1.0)

    api/live-info works diferently now?

    thanks

  • 32 Comments sorted by
  • Yep its messed up again today, sunday is displaying mondays schedule, monday is tuesday etc. Can you point me at the bit of code that handles this?
  • Reply to @Giga:

    The correct solution is to have this value customizable on from the JavaScript side. Will take a look into this.
    Airtime Pro Hosting: http://airtime.pro
  • Reply to @Giga:

    Airtime 2.1.3 is now available. Make sure you update the widgets used on your website with the new version provided by 2.1.3.
    Airtime Pro Hosting: http://airtime.pro
  • As far as I know, there are no differences for thw widgets between 2.0 and 2.1. Have you resolved this issue?
    Airtime Pro Hosting: http://airtime.pro
  • I'm having the same issue. 

    I hadn't removed the hack I did to get it working (see my other post on that) so I thought that may be it. But maybe not?

    Wait, its moved everything a day on, i.e. its displaying sundays schedule under the tab for monday etc. Can you check to see if this is the case for you also Vasco?
    Post edited by Dominic at 2012-06-24 10:56:38
  • Just to add, It seems ok today which makes me think the problem may relate to the day it refreshes which I had set to Sunday.
  • @Dominic,

    We resolved this issue in 2.1.2. Could you try removing your "hack" to see if it is conflicting with our fix?
    Airtime Pro Hosting: http://airtime.pro
  • hi,

    still the same problem....
    i've tried the new widgets 2.1.2 same goes

    when i do :

    curl -s "http://localhost/api/live-info/?callback=***"

    i get this information (it only shows the next two shows - where there should be 3 shows for today):

    ***({"env":"production","schedulerTime":"2012-06-26 20:03:47","previous":{"name":"STRESS FM - JINGLESTRESSrobotfuturochileno","starts":"2012-06-26 14:53:39.232208","ends":"2012-06-26 14:54:16.303158","type":"track"},"current":{"name":"Jarda - Jarda #04","starts":"2012-06-26 19:00:00","ends":"2012-06-26 19:59:59.078458","media_item_played":true,"record":0,"type":"track"},"next":{"name":"jingles stress - jingle stress at home","starts":"2012-06-2620:00:00","ends":"2012-06-26 20:00:05.224833","type":"track"},"currentShow":[{"start_timestamp":"2012-06-26 20:00:00","end_timestamp":"2012-06-26 21:00:00","name":"Jarda","id":176,"instance_id":1037,"record":0,"url":"http:\/\/blog.stress.fm\/search\/label\/Jarda","starts":"2012-06-26 20:00:00","ends":"2012-06-26 21:00:00"}],"nextShow":[{"id":13,"instance_id":531,"name":"Radio Shaoxing","url":"http:\/\/blog.stress.fm\/search\/label\/Shaoxing","start_timestamp":"2012-06-26 21:00:00","end_timestamp":"2012-06-26 22:00:00","starts":"2012-06-26 21:00:00","ends":"2012-06-26 22:00:00","record":0,"type":"show"}],"timezone":"WEST","timezoneOffset":"3600","AIRTIME_API_VERSION":"1.0"})

    before, i could see the next shows (even if it was the next day), and now that information isn't available for the today widget....

    i can see the week schedule working fine here (week-info):
    http://ec2-176-34-206-28.eu-west-1.compute.amazonaws.com/semana-iframe.html

    you can see that there are more shows today but they don't show up here (live-info):
    http://ec2-176-34-206-28.eu-west-1.compute.amazonaws.com/hoje-iframe-2.1.2.html

    thanks
  • In file /usr/share/airtime/application/controllers/ApiController.php i have this:

    [...]
    /**
    * Retrieve the currently playing show as well as upcoming shows.
    * Number of shows returned and the time interval in which to
    * get the next shows can be configured as GET parameters.
    *
    * TODO: in the future, make interval length a parameter instead of hardcod$
    *
    * Possible parameters:
    * type - Can have values of "endofday" or "interval". If set to "endofday",
    * the function will retrieve shows from now to end of day.
    * If set to "interval", shows in the next 48 hours will be retrived.
    * Default is "interval".
    * limit - How many shows to retrieve
    * Default is "5".
    */
    public function liveInfoAction()
    [...]

    when i try calling this function with: curl -s http://localhost/api/live-info?type=interval&limit=10&callbak=***

    i just get the next 2 shows

    what am i doing wrong?

    thanks
  • Ok, I took the hack out of the code and its working fine. I'll Keep an eye on it when the schedule refreshes on Sunday. 
    Post edited by Dominic at 2012-06-29 13:10:49
  • Reply to @Dominic:

    Look in around application/controllers/ApiController.php:311

    We'll investigate this.
    Airtime Pro Hosting: http://airtime.pro
  • Thanks, I'll have a look. It has righted itself again. the problem seems to occur on sundays when it is set to refresh. Monday it corrects itself.

    D
  • Vote Up0Vote Down GigaGiga
    Posts: 80Member
    when will there be a fix on this? did anyone point out when and why is this happening? my todayshows widgets is only showing two shows no matter what, cheers.
  • Vote Up0Vote Down GigaGiga
    Posts: 80Member
    thank you, waiting your reply...
  • Vote Up0Vote Down GigaGiga
    Posts: 80Member

    Reply to @Martin+Konecny:

    any update Martin?

  • Vote Up0Vote Down GigaGiga
    Posts: 80Member

    Reply to @Martin+Konecny:


    I'm struggling since morning with the 2.1.3 update:

    ~$ sudo apt-get upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages have been kept back:
    linux-generic linux-headers-generic linux-image-generic
    0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
    1 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Setting up airtime (2.1.3-1) ...
    Site airtime-vhost disabled.
    Run '/etc/init.d/apache2 reload' to activate new configuration!
    Setting up apache2...
    Enabling site airtime-vhost.
    Run '/etc/init.d/apache2 reload' to activate new configuration!
    Module rewrite already enabled
    Configuring php5...
    Setting up icecast2...
    Restarting icecast2: Starting icecast2
    Detaching from the console
    icecast2.
    Setting up monit configuration...
    Stopping daemon monitor: monit.
    Starting daemon monitor: monit.
    www-data www-data 750 /srv/airtime
    dpkg-statoverride: warning: An override for '/srv/airtime' already exists, but - -force specified so will be ignored.
    * Restarting web server apache2 ... waiting [ OK ]
    Liquidsoap symlink points to the right place!

    Debian package of Airtime detected...

    * Making sure /etc/default/locale is set properly
    LANG="en_US.UTF-8"
    * Checking for existing Airtime installation...
    * Same version of Airtime already installed!
    dpkg: error processing airtime (--configure):
    subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
    airtime
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    please note that I have airtime on an alternative port ( not on 80 ) tried changing it back to 80 and then re performed the update, same all over, any recommendations?

    and will sudo apt-get purge airtime then sudo apt-get install airtime delete the media in this folder:/srv/airtime/stor/ ?

    would appreciate your answer, regards Martin

    Post edited by Giga at 2012-07-14 17:15:46
  • Not sure how your system got into that state. 

    Do the following:

    sudo -u postgres psql -c "update cc_pref set valstr='2.1.2' where keystr='system_version';" airtime

    and then re-run the install package.
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down GigaGiga
    Posts: 80Member

    Reply to @Martin+Konecny:

    you are a life saver, it worked like a charm...

    will change the wigets and let you know about them too.... thank you

  • Vote Up0Vote Down GigaGiga
    Posts: 80Member
    sadly the widget problem weren't solved, you should know that I use CACHING SCHEDULE INFORMATION and it works on a subdomain of the airtime subdomain ( airtime: stream.domain.com, schedule on: info.stream.domain.com ) and I have airtime on a custom port, not at port 80 , and nothing seems to solve this!
  • Ok, it sounds like your caching solution is broken.

    Did you follow the steps here?



    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down GigaGiga
    Posts: 80Member

    Reply to @Martin+Konecny:

    No, I probably followed the instruction of one of the previous manuals, so for example my etc/cron.d/airtime-schedule contains: * * * * * www-data /usr/local/bin/airtime-schedule.sh

    would it change anything if I deleted all and followed the updated instructions!?

    please note that airtime-schedule.sh contains:

    #!/bin/sh
    curl -s "http://subdomain.domain.tld:customport/api/live-info/?callback=***" > /tmp/airtime-live-info
    curl -s "http://subdomain.domain.tld:customport/api/week-info/?callback=***" > /tmp/airtime-week-info


    so the subdomain.domain.tld:customport is the location of airtime of course

    Post edited by Giga at 2012-07-15 10:12:00
  • sudo -u www-data '/usr/local/bin/airtime-schedule.sh'

    Try running this manually and see if it updates the file '/tmp/airtime-live-info' with the expected results.
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down GigaGiga
    Posts: 80Member

    Reply to @Martin+Konecny:

    I ran it, same result afterwards, only next two shows are appearing in widget.

  • I would suggest you look at the chain of data between the Airtime server and your caching solution and verify every step returns what'd you expect.
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down GigaGiga
    Posts: 80Member

    Reply to @Martin+Konecny:

    I will do that, but can you please confirm me Martin that it was previously tested to have a caching solution while airtime is accessed through a custom port other than 80?

  • It was tested through different ports a few times. It should not matter at all what port is used in this case however.
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down GigaGiga
    Posts: 80Member

    Reply to @Martin+Konecny:

    I tried in so many ways to fix this, I did reset the caching solution, tried several subdomains, disabled all firewalls, checked the apache for the for the caching address zillion times....the today schedule is only showing 2 shows whatever I do, but when I change the airtime port back to 80 and use the direct link to airtime, then the todays schedule shows all items it's supposed to show!!!

  • Have you checked the flow of the data from the server to the cache and then to the browser? There must be some link in the chain that is broken. 

    For example, running "/opt/airtime/export-widget-data.sh" manually, what do you see in "/tmp/airtime-live-info" ?
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down GigaGiga
    Posts: 80Member

    Reply to @Martin+Konecny:


    I don't know if I ran it right, but here are an interesting result!!!

    sudo -u www-data '/opt/airtime/export-widget-data.sh'

    /opt/airtime/export-widget-data.sh: 2: cannot create /tmp/airtime-live-info: Permission denied

    /opt/airtime/export-widget-data.sh: 3: cannot create /tmp/airtime-week-info: Permission denied

    or shouldn't I run it as www-data !? 

  • Those scripts are run as root, so try that and see what happens.
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down GigaGiga
    Posts: 80Member

    Reply to @Martin+Konecny:

    First, thank you very much Martin for your attention, Second, the /tmp/airtime-live-info contains only the next two shows, with the song names that are played in each show. what is this suppose to mean?

  • Please open "/opt/airtime/export-widget-data.sh" and change the entries to the following:

    #!/bin/sh
    curl -s "http://localhost/api/live-info/type/endofday?callback=***" > /tmp/airtime-live-info
    curl -s "http://localhost/api/week-info?callback=***" > /tmp/airtime-week-info


    Let me know if that addresses the issue.
    Airtime Pro Hosting: http://airtime.pro