explodingcamera / subsonic-api

typescript/javascript library for interacting with subsonic-compatible apis
https://www.npmjs.com/package/subsonic-api
MIT License
10 stars 1 forks source link

Is there a way to get all albums from an artistId? #2

Closed ChucKN0risK closed 1 year ago

ChucKN0risK commented 1 year ago

Hello ✌️

I'm currently using Navidrome.

Navidrome seems to have a private API with different endpoints and parameters like we see here: CleanShot 2023-09-08 at 13 52 56

Is there a way to get all albums from an artistId like Navidrome does? I can only see the getAlbumList method which only has the id (of the album) parameter. This returns a list of albums that all have the artistId. I could get the albums from an artist by using both the getArtists and getAlbumList but it's not practical.

Is there a cleaner/simpler way of doing this?

Thanks ;)

explodingcamera commented 1 year ago

That API is sadly undocumented and unstable, and also uses a different authentication mechanism. I've added an example on how to use it to example/navidrome.ts getArtist should also return all albums, but it had the wrong typescript type, I've fixed it in the latest version.

ChucKN0risK commented 1 year ago

Thanks a lot. I'll use the getArtist method then :)