From: Giuseppe Bilotta Date: Mon, 16 Feb 2009 21:34:23 +0000 (+0100) Subject: lastfm: put URL in artist summary X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=44dcfe27b196bafb4fd3b6f1cf4e3256846d37c6;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git lastfm: put URL in artist summary --- diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb index 29f85aab..0600c106 100644 --- a/data/rbot/plugins/lastfm.rb +++ b/data/rbot/plugins/lastfm.rb @@ -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