[API Request] Add seed
parameter to random queries
#92
kgarner7
started this conversation in
API requests
Replies: 1 comment
-
I 100% agree on the need, but I think it's time to build the proper new endpoints for getalbums/songs/artists & co that will support all new things and field for filtering and proper paging. Adding a new field specific to paging for a temporary thing that I hope we address in the new endpoints does not make sense IMO. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Type of change
API extension
Proposal description
Currently, there are a few API endpoints that support sorting by random:
getAlbumList
,getAlbumList2
andgetRandomSongs
(alsogetSimilarSongs
+getSimilarSogns2
if not using Last.fm). However, it is difficult to ensure deterministic paging across multiple queries as there isn't a way to identify that multiple queries should be seeded the same.This extension would give clients the ability to specify a
seed
across multiple calls to enable deterministicrandom
sorting.Backward compatibility impact
None; servers that don't implement the
seed
can just ignore it.Backward compatibility
API details
Add a new string query parameter
seed
to the following endpoints that takes effect if the sort israndom
:getAlbumList
getAlbumList2
Add a new string query parameter
seed
togetRandomSongs
.It might also make sense to add the
seed
togetSimilarSongs
andgetSimilarSongs2
, although for servers that use data by Last.fm this seed is not really helpful.The specific implementation on how the seed is used by the server for random sorting is server-defined. If the
seed
is not defined, then the server may assume that each call has a different seed.Security impacts
No response
Potential issues
No response
Alternative solutions
No response
Beta Was this translation helpful? Give feedback.
All reactions