Registered Member
|
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! |
Manager
|
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
Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ... |
Registered Member
|
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. |
Registered users: Bing [Bot], Evergrowing, Google [Bot], Sogou [Bot]