[API Request] Artist-independent search and recency filter for getTopSongs #268
codesoap
started this conversation in
API requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Type of change
API extension
Proposal description
The
getTopSongsendpoint currently finds the top songs for a given artist. In my music listening patterns, I frequently search for songs I have recently played a lot. It would be helpful to me, if the API could give me top songs of the recent history, independent of artist.Backward compatibility impact
I think the
getTopSongsendpoint could be tweaked without breaking current behaviour. The name of the existing endpoint does not imply a restriction to a single artist, so I think it fits.Backward compatibility
API details
These changes could be made to the
getTopSongsendpoint:artist/idquery parameters become optional. If they are missing, the search is not restricted to a single artist.recentquery parameter. If it is set, top tracks of the recent history are returned.For last.fm, user.getTopTracks could implement this. It returns top songs independent of artists, and has an optional
periodfilter with the following options:overall,7day,1month,3month,6month,12month. Ifrecent=True, e.g. the filter1monthcould be used.PS: I intend to use a custom backend instead of last.fm, songmem. It has a "frecency" sorting, without a specific cutoff time, (see https://wiki.mozilla.org/User:Jesse/NewFrecency for the algorithm). That's why I'm suggesting a boolean instead of copying the
periodfilter—it grants more freedom in the implementation.Security impacts
No response
Potential issues
No response
Alternative solutions
No response
All reactions