]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
lastfm: put URL in artist summary
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 16 Feb 2009 21:34:23 +0000 (22:34 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 16 Feb 2009 21:34:23 +0000 (22:34 +0100)
data/rbot/plugins/lastfm.rb

index 29f85aab8623b25f9942e65793eec253eb67993f..0600c106273326d199605529653edb01d4cf5421 100644 (file)
@@ -288,10 +288,12 @@ class LastFmPlugin < Plugin
     end
     first = doc.root.elements["artist"]
     artist = first.elements["name"].text
+    url = first.elements["url"].text
     playcount = first.elements["stats"].elements["playcount"].text
     listeners = first.elements["stats"].elements["listeners"].text
     summary = first.elements["bio"].elements["summary"].text
-    m.reply _("%{b}%{a}%{b} has been played %{c} times and is being listened to by %{l} people") % {:b => Bold, :a => artist, :c => playcount, :l => listeners}
+    m.reply _("%{b}%{a}%{b} <%{u}> has been played %{c} times and is being listened to by %{l} people") % {
+      :b => Bold, :a => artist, :u => url, :c => playcount, :l => listeners}
     m.reply summary.ircify_html
   end