When there are only a few items at the top level of the hierarchy for a scripted service, Amarok automatically tries to populate them all simultaneously before they are expanded by the user. This ends up with child items appearing under the wrong parent, always the one displayed last in the collection browser (reversing the sorting order changes which parent they are inserted under). When a long list of items is inserted at the top level, Amarok waits until the user expands them to populate the level below. This generally works as expected. However, if the user expands multiple parents in rapid succession (before any of them finish downloading and processing their respective data), the same issue occurs. It seems that Amarok assumes there is only one parent item being populated at a time, so it does not keep track of which parent item scripts insert child items under. Amarok does not keep track of which parent script.donePopulating() is executed for either. That is, when Amarok reaches script.donePopulating() for the first parent item, it will not let the script insert items under any of the other parents: amarok: BEGIN: int AmarokScript::ScriptableServiceScript::donePopulating() const amarok: BEGIN: void ScriptableServiceManager::donePopulating(const QString&, int) amarok: Service name: "SoundCloud" , parent id: 286 amarok: BEGIN: void Collections::ScriptableServiceCollection::donePopulating(int) amarok: BEGIN: void Collections::ScriptableServiceQueryMaker::slotScriptComplete() amarok: [ScriptableServiceQueryMaker] there are 0 albums amarok: END__: void Collections::ScriptableServiceQueryMaker::slotScriptComplete() [Took: 0s] amarok: BEGIN: void Collections::ScriptableServiceQueryMaker::slotScriptComplete() amarok: [ScriptableServiceQueryMaker] there are 0 albums amarok: END__: void Collections::ScriptableServiceQueryMaker::slotScriptComplete() [Took: 0s] amarok: BEGIN: void Collections::ScriptableServiceQueryMaker::slotScriptComplete() amarok: [ScriptableServiceQueryMaker] there are 0 albums amarok: END__: void Collections::ScriptableServiceQueryMaker::slotScriptComplete() [Took: 0s] amarok: BEGIN: void Collections::ScriptableServiceQueryMaker::slotScriptComplete() amarok: [ScriptableServiceQueryMaker] there are 0 albums amarok: END__: void Collections::ScriptableServiceQueryMaker::slotScriptComplete() [Took: 0s] amarok: BEGIN: void Collections::ScriptableServiceQueryMaker::slotScriptComplete() amarok: [ScriptableServiceQueryMaker] there are 0 albums amarok: END__: void Collections::ScriptableServiceQueryMaker::slotScriptComplete() [Took: 0s] amarok: BEGIN: void Collections::ScriptableServiceQueryMaker::slotScriptComplete() amarok: [ScriptableServiceQueryMaker] there are 9 albums amarok: END__: void Collections::ScriptableServiceQueryMaker::slotScriptComplete() [Took: 0s] amarok: END__: void Collections::ScriptableServiceCollection::donePopulating(int) [Took: 0s] amarok: END__: void ScriptableServiceManager::donePopulating(const QString&, int) [Took: 0s] amarok: END__: int AmarokScript::ScriptableServiceScript::donePopulating() const [Took: 0.001s] Reproducible: Always
Created attachment 90250 [details] debugging output when Amarok works as expected when searching for "Culprate" with the attached script
Created attachment 90251 [details] debugging output when Amarok inserts child items under wrong parent when searching for "Wildlight" with attached script
Created attachment 90252 [details] SoundCloud script used to generate attached debugging outputs
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!