Closed sleepdeprecation closed 10 years ago
With option 1, we either have to store the AlbumArtist/Album field by editing the files (which I wouldn't want something editing my files without me knowing), or we would have to do it on every startup and keep the info in memory. We'd also have to manually update our list of artists, while we currently get it from MPD on demand, so if an artist is added, we let MPD handle it. I think this could add some complexity, and be memory/start up time inefficient.
Option 2 on the other hand may add a few milliseconds to every artist request, but no one will notice that. It also doesn't seem like it will add too much complexity (I think).
Currently, when we grab all artists, we use the command list artist
. This just returns a list of artists. We could also use list albumartist
, and merge the lists together. We'd have to ignore duplicate Strings, but I don't think that would be that hard. I don't see any Set
data type for Go, but there are a few solutions.
HashMap
. The key and the value would both be the Artist/AlbumArtist. When we're done creating the HashMap
. Next we have two options.
Set
and we could deal with it there. This isn't too ideal because we're sending/receiving more data than we need to.Option 2ii sounds the most network efficient to me, but option 3 sounds the easiest. Any thoughts on this?
I though MPD would have a way to play with the database without fiddling with the files. It doesn't.
Isn't a Set
just a list? Which in Go is an array
or slice
. But still, we'd need to do it manually when we get down to the song level. I don't know why we'd need a map...
What seems best to me is to basically create our own DB layer over MPD's:
What seems even better to me is to mark this as wontfix because we're basically going to be creating our own DB layer over MPD's which is unnecessary and we can just tell the users (AKA me in this instance) that they're wrong and this is the way to do things.
In Dart, a Set
is a list that doesn't contain duplicates.
I think I agree with the wontfix part. Mostly because I don't like my songs sorted by AlbumArtist, and I always just make sure the AlbumArtist field is the same as the Artist field.
wontfix.
Using AlbumArtist instead of Artist means that sorting is done better. There are things like compilation albums, or collaborations on songs which puts the collaborators in the Artist field, but uses the AlbumArtist field to store the album's artist.
There are two options I see to make this work: