lms
lms copied to clipboard
Handle Album and Song ids on getSimilarSongs subsonic endpoint
Hi!
I've noticed LMS doesn't seem to like being given ids that are not Artist (i.e. Song or Album) ids on the getSimilarSongs endpoint, failing with a "Required parameter id is missing" error.
In the endpoint description in the subsonic api (http://subsonic.org/pages/api.jsp#getSimilarSongs2), the parameter details say that the given id can be for an Artist, an Album or a Song, I assume that in those cases the id would return the album or song artist respectively.
Thanks.
Well note sure about this one?
-
getSimilarSong2
only says "The artist ID" for the parameter -
getSimilarSong
says "Returns a random collection of songs from the given artist and similar artists" but the parameter description is also about album or song ids.
Looks like there is only an error in the parameter description of getSimilarSong
?
Do you know what does the "official" subsonic implementation accept?
I'm actually not sure, as I've never used any official subsonic anything. You're absolutely right that the subsonic API is ambiguous about it, I just read over it and the implementations I use happen to handle the endpoint as I understood it the first time. My bad on that end.
The implementations I know handle ids for both albums and songs as well, and they get the "Artist" when it's a song and the "Album Artist" when it's an Album. It could be a proposed enhancement, as the existing functionality (make a radio based on an Artist when the backend gets an Artist id) wouldn't break. The main mechanic (which is making a list of songs based on an Artist) would be untouched, only varying where do you get that Artist Id from.