Merge pull request #43 from telnoratti/master

Fix for missing artist
master
mutantmonkey 2012-10-08 22:02:42 -07:00
commit 4b199e9629
1 changed files with 2 additions and 5 deletions

View File

@ -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)) phenny.say("%s hasn't played anything recently. this isn't you? try lastfm-set" % (user))
return return
tracks = list(recenttracks[0]) tracks = list(recenttracks[0])
#print etree.tostring(recenttracks[0]) #print(etree.tostring(recenttracks[0]))
if len(tracks) == 0: if len(tracks) == 0:
phenny.say("%s hasn't played anything recently. this isn't you? try lastfm-set" % (user)) phenny.say("%s hasn't played anything recently. this isn't you? try lastfm-set" % (user))
return return
@ -115,10 +115,7 @@ def now_playing(phenny, input):
track = tags['name'].text.strip() track = tags['name'].text.strip()
artist = "" artist = tags['artist'].text.strip()
for e in tags['artist']:
if e.tag == 'name':
artist = e.text.strip()
album = "unknown" album = "unknown"
if tags['album'].text: if tags['album'].text: