jreese/spotify-gnome — pull request #12 by mattjbray (2013-04-25 23:28:43+00:00)
Title: Threaded cover images

This is based on the refactor branch (#11) so may need some rebasing later on if there are changes on that branch.

First, the notification icon is set with 'media-playback-start'. Then, the `FetchAndUpdateCoverIcon` thread is started, downloads or fetches the cover image from the cache, and updates the notification.

To prevent old threads overwriting new ones (i.e. if the user skips through songs quickly), a basic check on the start time of the current thread vs the start time of all other running threads is performed. However this won't catch the case where an old, long-running thread doesn't finish until after a new, short-running thread has exited - the newer, terminated thread will not show up in the check (because it has terminated), and its notification will be overwritten.

Any suggestions for a better way of doing this?