Find all albums

Hi I’m just getting started with using the mopidy server and would like it to list all albums from the local backend.

I’m using the Rest api and I can’t seem to find a method that does what I want. I thought I could use the browse method but that only seem to be able to browse the actual directory structure of my media archive.

The only way I’ve found that this can be done is to use the search method and leave the query empty and then loop through all the tracks and extract the album information. And this can’t be the right way to do it.

Any help or pointers in the right direction would be much appreciated.

Best regards

You could try the mopidy-local-sqlite backend, which gives you “virtual directories” for albums, artists, genres, etc., which can be accessed using browse.

Alternatively, there’s the get_distinct() method, which you can use to get the distinct names of your albums:

Oh, and passing an empty query to search is deprecated, AFAIK, so this is definitely not the way to go :wink:

Oh nice!

That seems to be exactly what I’m looking for, I’ll give it a whirl tonight!


Tried it and sqlite works great! Thanks for the pointer.