Control iTunes and Spotify using the same global hotkeys with this Alfred workflow. Play magically knows which player you're currently using and sends the command to the right place.
Download — stable version.
The source code is available here: https://github.com/pstadler/alfred-play