Without going into too much detail, I'm trying to write a program that unsurprisingly hooks into the library.
I can get a complete list of the files, that's obviously easy. But with my library that takes quite a while.
What I want to do is start from one of the following:
a. a list of all albums
b. a list of all artists
c. a list of all genres
Obviously I can read all the files into my own data structures and do it that way, but that's not going to speed up the initial read any. So what's the best way to pull back just the minimum information?
I can obviously call AlbumGroup on my list of files, and that certainly does speed it up massively - but is that the only way? That obviously helps a BIT with the artists too assuming that you do actually have a reasonable number of albums rather than all different files by different artists, and of course the same thing is true with genres. But there are only going to be a small number of genres, so it seems a bit silly to have to trawl through the complete list of albums to build the list of genres. MC clearly already knows what the list of genres, the list of album names and the list of artist names, but how do I access them directly?
And then once I've done that, I want my program to be aware when the library changes, but I guess I'll just have to keep polling the library? There doesn't seem to be an interface for checking that a change has been made to the library...
Thanks for any help
Rob