Scripting question

Andreas Wuest andreaswuest at gmx.de
Wed Mar 25 18:48:15 UTC 2009


Hi,

i have some problems using the filter in my script. when i start amarok the
list is populated with the items. works fine. however, after entering some text
in the filter box, all items disappear and never show up again. since there
is no filtering logic in the onPopulating method at all, i would expect no
changes in the displayed list. any hints are really appreciated. here is my 
very simple script:

function RadioAT()
{
    ScriptableServiceScript.call( this, "Radio Austria", 1, "List of some 
Austrian Radio Stations", "Enjoy it", true );
}

function onPopulating( level, callbackData, filter )
{
    Amarok.debug( " statio level " );
    Amarok.debug( " filter : " + filter );
    for ( i = 0; i < 10; i++ )
    {
        Amarok.debug(" item : " + i);
        item = Amarok.StreamItem;
        item.level = 0;
        item.callbackData = "";
        item.itemName = "name" + i;
        item.playableUrl = "mms://stream0.orf.at/fm4_live" + i;
        item.infoHtml = "A cool stream called " + i;
        script.insertItem( item );
    }
    script.donePopulating();
}

script = new RadioAT();
script.populate.connect( onPopulating );




More information about the Amarok mailing list