abarisain/dmix — pull request #221 by mafrosis (2013-05-02 08:28:27+00:00)
Title: Album grid (part two)

This pull req currently includes all the commits from #220. **Please don't merge until after #220!** I'll rebase the commits in here after that is merged.

Adds an option to display album artwork as tiles in the library, instead of in a list.

Changes:
* Display the amount of disk space used by album art in the cache fb7b720
* Fixed an exception in LastFMCover that I saw many times 1c8c497
* Refactored the AlbumDataBinder code so it's reusable 4bf783f cab003a
* Based on that, I refactored all places that listen for onCoverDownloaded events e8abde2
* 43e9e03 has the album artwork grid stuff shown here:

![Screen shot](https://gist.github.com/mafrosis/5500867/raw/c9962c7fe13d337a70ef913adbd3cd8d5c116e3a/Screenshot_2013-05-02-18-05-21.jpg)

**Notes:**

* Album artwork is now stored against both the album name, and the artist/album name. This obviously means storing more data, but seemed the sensible short-term option.
* In the case where we have two albums with the same title, unfortunately which ever is viewed first will have its album artwork cached against that name. This is obviously crap, but it is a feature of how MPD's API returns albums by album name only. (Albums with the same name already have their tracks mixed together when listing songs.)
* Album artwork will always be loaded from the cache and subsequently only be downloaded when connected to wifi.
* Switching the setting on requires cover caching to also be enabled to save on overall bandwidth usage.
* The feature is also noted experimental in settings :)

**Next steps:**

* Modifying CoverAsyncHelper to use AsyncTask and a thread pool to help loading many artworks concurrently.