There is a newer method to create and edit playlists in Power Ampache 2, which is currently not working on API6, a fix has been made by Ampache developers (Dev branch of Ampache Server).
In the old version of the method to create/add to playlist, when adding a list of songs to a playlist, the songs are added one by one, which is very slow and puts a lot of pressure on the server. In the new version of the API on the other hand, only one call with all the necessary info (tracks, track order, etc..) is necessary to edit the playlist.
Right now, since the fix only works on the dev version of API6, and Power Ampache needs to support every previous version, I am using the slow legacy version of this method.
The right way to do this is to use the new version of the method, and only if it doesn't work, fallback to the legacy slow version.
There is a newer method to create and edit playlists in Power Ampache 2, which is currently not working on API6, a fix has been made by Ampache developers (Dev branch of Ampache Server).
In the old version of the method to create/add to playlist, when adding a list of songs to a playlist, the songs are added one by one, which is very slow and puts a lot of pressure on the server. In the new version of the API on the other hand, only one call with all the necessary info (tracks, track order, etc..) is necessary to edit the playlist.
Right now, since the fix only works on the dev version of API6, and Power Ampache needs to support every previous version, I am using the slow legacy version of this method. The right way to do this is to use the new version of the method, and only if it doesn't work, fallback to the legacy slow version.