Reply to topic

Reload stations in script

jbatalle
Registered Member
Posts
2
Karma
0

Reload stations in script

Thu Jan 10, 2013 4:16 pm
Hello,
i'm developing a script for amarok. I put a option that allow the user update the list of stations during the execution of the program.
I mean, I have a menu button that download a list of stations, then this stations are allocated in the album. You only can download these stations when you push the button. But if user enters in the album and then push the button, the list is downloaded but the new stations don't appear in the album.

Also the user only can update the list of stations once time. If the user download the list at the start up, and then enters to album, all of these works fine. But then when the user needs to update the list, the new stations don't appear.

How can I reload the list of stations when the user push a button? Or, can I reload the stations list when the user enters inside the album?
I'm develop the script using javascript and I'm using the donePopulating() function to put the stations.

Thank you!
User avatar Mamarok
Manager
Posts
2916
Karma
8
OS

Re: Reload stations in script

Thu Jan 10, 2013 8:41 pm
Did you have a look at the scripting API here: http://community.kde.org/Amarok/Development/Script_API ? I also suggest you look at how others solved this in their scripts, see the Amarok 2 scripts on http://kde-apps.org


Mamarok, hanging out in the Amarok forum since August, 2007
Currently running Kubuntu Trusty 14.04, KDE 4.12.95, Amarok 2.8-git of the day
jbatalle
Registered Member
Posts
2
Karma
0

Re: Reload stations in script

Thu Jan 10, 2013 11:37 pm
Mamarok wrote:Did you have a look at the scripting API here: http://community.kde.org/Amarok/Development/Script_API ? I also suggest you look at how others solved this in their scripts, see the Amarok 2 scripts on http://kde-apps.org

Yes, i read the API and also I saw other codes like an examples. But in the other codes the stations are loaded as a variable in the same script. In my script this stations are loaded by a json file, and this json file can change during the execution of the amarok.
Then the user can update the list of stations pushing an update button, but the list is not updated.

 
Reply to topic

Bookmarks



Who is online

Registered users: Annorax, Baidu [Spider], bcooksley, Bing [Bot], Exabot [Bot], garthecho, Google [Bot], Hans, koriun, La Ninje, Naver Yeti [Spider], pedrorodriguez, Steve Guilford, valoriez, Wiz, Yahoo [Bot], šumski