widget problems
  • Vote Up0Vote Down GigaGiga
    Posts: 80Member

    Hi all,

    first problem, when I designed the radio site I thought that the "Now Playing" widget displayed current song, not current show, can I make it display current song/next song instead of current show, please note that I don't want to use the ugly player which displays current song from icecast "Native Flash"

    Second problem, the "program today" widget only displays the next two shows, no matter what number of next shows are, I have latest airtime and latest widget editions, is there something I'm missing!

    Post edited by Giga at 2012-06-30 12:28:24
  • 7 Comments sorted by
  • hi,

    for the first problem:
    i've added some lines to the liquidsoap ls_script.liq so that on_metada would write the metadata of the current song a file that would be read by the widgets. (i only made the part of writing the file with the metadata - you would have to alter the widget or create php script of some kind that can read the file and put it on the web page)
    this is what i've done:

    created /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_mylib.liq:
    def say_meta(m)
      system("/opt/airtime/say_meta.sh #{m[\"artist\"]} - #{m[\"title\"]}")
    end

    created a file /opt/airtime/say_meta.sh:
    #!/bin/bash
    if ! [[ "$@" == "" ]]; then
        metadata="$@"
    else
        metadata="uknown"
    fi
    echo "$metadata" > /tmp/meta.txt

    added two lines to the /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq
    %include "ls_mylib.liq"
    default = on_metadata(say,default)

    default is the default random playlist when nothing is scheduled in airtime. you ca add that line somwhere else to do the same thing for the airitme scheduled shows

    As for the second problem i have no possible solution. the same happens to me.
    i've tried to call the API with:
    curl -s "http://localhost/api/live-info/?type=interval&limit=10&callback=***"

    and it does exactly the same: only two shows
    it should give the next 10 shows with no limit in time

    you can check this options here:
    /usr/share/airtime/application/controllers/ApiController.php
    search for limit and interval

    hope it helps

  • Vote Up0Vote Down GigaGiga
    Posts: 80Member

    Hi,

    thank you for your detailed reply I will try that soon and will let you know the results, about the second problem, I've checked ApiController.php and all seems to be fine, had to change the limit from 5 to 10, but I guess I shouldn't expect much from this modification, since it's displaying only 2, will try.

    anyhow I believe many are having this problem according to this form, hope someone could point out the reason soon, thank you.

  • Vote Up0Vote Down GigaGiga
    Posts: 80Member

    anyone has an update on the " only two programs" in the todayshows widget? really need a solution for that!!!

    to VAsco: didn't test your solution for the first problem yet, as I promised before, will let you know if it works.


    Thank you

  • Reply to @Giga:

    This is now configurable in 2.1.3. In 2.1.2 it was hard-coded to 5, so I'm not sure why you are only seeing 2? How many shows do you have scheduled per day?
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down GigaGiga
    Posts: 80Member
    my schedule is set to the next three days, by average ten shows a day
  • I am showing the same problem.  I have set the setting in ApiController.php to 10 here: 

    $limit = $request->getParam('limit');
                    if($limit == "" || !is_numeric($limit)) {
                        $limit = "10";
                    }


    I have also set my export settings to 10 here:

    I can see the exported data in the airtime-live-info file as well it's just not posting to the table in the iframe.  I am using wordpess if that makes any difference.  Wordpress is horrible with these widgets too.  I cant even use the weekly widget because it uses anchors for the different day tabs and wordpress doesn't like that at all.  

  • Reply to @Francis+Xavier:


    Please try if the updated caching script listed here fixes your issue:
    Airtime Pro Hosting: http://airtime.pro