I agree that this makes sense as part of a new bug.

A hash function should be pretty fast (when you're designing one for use in a hash map, that's basically a requirement). All we'd need is a simple function that turns the album name into a number. If we wanted to get more advanced, we should also include the artist name and recording date in the hash function, but I don't think we actually split up albums like that now.

I'd only cache the hash value in the mediaDB if it turned out that we saw a measurable performance improvement from it. Otherwise, I think it would be easy to cause regressions if we changed something. For instance, not caching the hash value also makes it easier for us if we want to, say, change the number of placeholder images.