From 3d23dc53ad54599aee00999b7b82211577952c7c Mon Sep 17 00:00:00 2001 From: Calvin Winkowski Date: Tue, 9 Oct 2012 01:03:04 -0400 Subject: [PATCH] Fixed for suspected API change. I think the old key was bound to an older API switching keys cause the new API to be used. --- modules/lastfm.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/lastfm.py b/modules/lastfm.py index 3b3d6df..ba9649a 100644 --- a/modules/lastfm.py +++ b/modules/lastfm.py @@ -103,7 +103,7 @@ def now_playing(phenny, input): phenny.say("%s hasn't played anything recently. this isn't you? try lastfm-set" % (user)) return tracks = list(recenttracks[0]) - #print etree.tostring(recenttracks[0]) + #print(etree.tostring(recenttracks[0])) if len(tracks) == 0: phenny.say("%s hasn't played anything recently. this isn't you? try lastfm-set" % (user)) return @@ -115,10 +115,7 @@ def now_playing(phenny, input): track = tags['name'].text.strip() - artist = "" - for e in tags['artist']: - if e.tag == 'name': - artist = e.text.strip() + artist = tags['artist'].text.strip() album = "unknown" if tags['album'].text: