What to Do When Spotify Is Acting Weird (for Developers)

Sometimes Spotify starts acting weird. The easiest way to fix this is to clear your Spotify preferences and delete the application's cache. Here's how on OS X.

Spotify cache:

sudo rm -rf ~/Library/Application\ Support/Spotify/

Remote Spotify preferences:

rm -rf ~/Library/Preferences/com.spotify.client.plist