This patch fixes that bug. The problem was that the last.fm api returns the tracks key in one of two formats. If the user is listening to something, it's a list with the first item being the current track, and the second item being the most recent track. If they aren't listening to something, it's a dictionary representing the most recent track.
See issue: https://github.com/rmmh/skybot/issues#issue/9
This patch fixes that bug. The problem was that the last.fm api returns the
tracks
key in one of two formats. If the user is listening to something, it's a list with the first item being the current track, and the second item being the most recent track. If they aren't listening to something, it's a dictionary representing the most recent track.