Resolve "Subsonic search3 not returning all songs"

Merged Marcos Peña requested to merge 1782-fix-subsonic-search3-not-returning-all-songs into stable

Closes #1782 (closed)

Removes order_for_search (api/funkwhale_api/common/utils.py) from the queryset since it was ordering by a non unique order and might be the cause of the unpredictable results. Now it's ordered by the pk. According to the docs:

When using LIMIT, it is important to use an ORDER BY clause that constrains the result rows into a unique order. Otherwise you will get an unpredictable subset of the query's rows. You might be asking for the tenth through twentieth rows, but tenth through twentieth in what ordering? The ordering is unknown, unless you specified ORDER BY.

(Maybe we should rethink that function, it's also used in api/funkwhale_api/music/views.py. This could be easily fixed by making the sort key unique by adding the primary key to it.).

As requested, this MR also increases the result limit to 500, in coherence with get_album_list2 by the way.

Merge request reports