Commit a6ec6d80 authored by Committed by Marinus SchraalBrowse files
grltrackerplaylists: Improve smart playlists updates
The existing update method removes the songs which are not part of the playlist anymore and adds the new songs at the end of the model. This behavior assumes that the position of an existing song does not change on update. This is wrong for most of the smart playlists (for example, the MostPlayed playlist). This issue is fixed by removing the existing songs and adding the new ones in one go by a splice call. If a song was already part of the playlist, its state is preserved.