sampsyo/beets — pull request #472 by kljohann (2013-12-12 07:37:32+00:00)
Title: Refactor mpdstats plugin

I spent some time with the nice mpdstats plugin yesterday and ended up refactoring it quite a bit. All extra logic used to get information from MPD now is in `MPDClientWrapper` and the core logic has its own class `MPDStats`. There I split off most actions into separate functions that are called from a lean event loop. The last commit fixes the 'caching' behavior mentioned on IRC. Sorry for this huge diff, but I think it ended up both clearer and more extendable.