more Scripting questions

Andy andreaswuest at gmx.de
Wed Jun 17 18:14:07 UTC 2009


Hello,

i have some questions concerning the scripting interface :

1. i just do not understand the filtering. unfortunately the wiki page
    is not very detailed.

http://amarok.kde.org/wiki/Development/Scripted_Services_Tutorial_2.0#Filter

    i just wanted to understand how the filtering works and i changed only one
    thing in the "Cool Streams" script. i changed the last argument to true,
    so i get the filter input field. !

>     ScriptableServiceScript.call( this, "Cool Streams", 1, "List of some 
high quality radio streams", "Some really cool radio streams, hand picked for 
your listening pleasure by your friendly Amarok developers", true );

    i do not understand why the onPopulation method does not work anymore.
    since there is nothing filtering specific configured i would expect no 
    changes in the behaviour of the script. however, once you enter something
    in the filter input field all streams disappear and you cannot get them
    back! I'd be nice if somebody could explain why this is the case, because
    i just do not get it :-(

2. On the page http://amarok.kde.org/wiki/Development/Script_API the 
   coverUrl attribute/parameter is missing for the StreamItem. 
   What is not clear about the coverUrl is if it only works for local files 
   (so far i have only that version) or if you can use real URLs that are 
   resolved (-> image is downloaded automatically so it can be displayed).

3. In the class AmarokScriptableServiceScript.cpp (latest revision 24126)
  
QString StreamItem::coverUrl()
{
    return m_coverUrl;; // <- one semi colon too much at the end of the line
                                   // however that is not really a bug ;-)
}

cheers,
andy


   



More information about the Amarok mailing list