2011-08-12, 08:09
topfs2 Wrote:yeah that was what I wanted but with just a different syntax Unless I'm missunderstanding you?
GetArtist(album_artist=true) : Fetch ever single artist no matter if its various
GetArtist(album_artist=false) : Only fetch "pure" artists
GetArtist() : Use default from GUI.
Personally I prefer not having more than one bool because it gets rather unclear what you want if you do GetArtist(use_gui=true, album_artist=true). Obviosly we could use an enum though and have album_artist="default" or something, but I personally think bool and omit is better, but will discuss it a bit internally
Tangent of the topic, I'm also somewhat thinking that we should perhaps flag the items too, so that a client could do post-fetch filtering if they so desire, so each artist has a flag which states if its various or not. And when settings is wrapped the gui setting will be available there.
I like the way you're thinking here, that flag you mention (your topic tangent) would also be useful when using GetAlbums();
Bear in mind that if you implement as you suggest, you will probably still want 'various' to appear in the list when calling GetArtist(album_artist=false), couple that with a parameter you could pass to GetAlbums() that forced it to return only VA albums and you would have good control of your Various Artist albums.
something like
GetAlbums(VA_only = true);