Scripting question

Nikolaj Hald Nielsen nhnfreespirit at gmail.com
Wed Mar 25 20:00:51 UTC 2009


If you dont need filtering at all, you should change the last argument
of the service creation call to false. Then the filter edit will not
show up at all.

ScriptableServiceScript.call( this, "Radio Austria", 1, "List of some
Austrian Radio Stations", "Enjoy it", false );

- Nikolaj


On Wed, Mar 25, 2009 at 7:48 PM, Andreas Wuest <andreaswuest at gmx.de> wrote:
> 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 );
>
> _______________________________________________
> Amarok mailing list
> Amarok at kde.org
> https://mail.kde.org/mailman/listinfo/amarok
>



More information about the Amarok mailing list