Too many selected artists results in sqlite3 error
Version
1.7.0-stable3
Where did you get Sayonara from?
self compiled from Git Rev 18e63ab3
Desktop environment
KDE
What's not working
In case you have a lot of artists (>1000) in your library and press Ctrl+A to first select all artists and then drag all artists into the playlist you will get no artists dragged at all, because the query to the sqlite3 db will have too many conditions in the where clause:
The error will be "Result: Expression tree is too large (maximum depth 1000)"
What do you expect?
all tracks are added to the playlist.
How to reproduce?
select more than 1000 different artists in the album artist library and try to drag them to the playlist
Solution
To overcome the issue at least for the more common case that one selects all artists, an easy workaround would be to check for the number of selected artists being equal to the number of all artists. In this case, one can switch to the code branch with the getAllTracks() call instead of calling getAllTracksByArtist().
During my examination I also stumbled above some probably unnecessary code execution in ItemModel::mimeData. The Util::set rows is filled but not used, so I would propose to remove this code.