summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/lastfm.rb
diff options
context:
space:
mode:
authorRaine Virta <rane@kapsi.fi>2009-03-05 20:17:23 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-03-10 21:55:54 +0100
commite946c1013c9ff816c2a477c879959418f705a4b4 (patch)
tree4879a5daebe08a99380330fb2a9e255bdc852aa5 /data/rbot/plugins/lastfm.rb
parentcace302f6134deb31fc662f8a6fe8ba7a45fc8fb (diff)
lastfm: fix a bug of uri not showing in loved/neighbors/friends
Diffstat (limited to 'data/rbot/plugins/lastfm.rb')
-rw-r--r--data/rbot/plugins/lastfm.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb
index 22bd1130..61ea81e4 100644
--- a/data/rbot/plugins/lastfm.rb
+++ b/data/rbot/plugins/lastfm.rb
@@ -637,8 +637,7 @@ class LastFmPlugin < Plugin
:user => user,
:total => friends.size,
:friends => Utils.comma_list(friends.shuffle[0, num]),
- :uri => "http://www.last.fm/user/#{CGI.escape user}/friends",
- :seemore => seemore
+ :seemore => seemore % { :uri => "http://www.last.fm/user/#{CGI.escape user}/friends" }
}
when :lovedtracks
loved = doc.root.get_elements("lovedtracks/track").map do |track|
@@ -653,12 +652,12 @@ class LastFmPlugin < Plugin
else
reply = _("%{user} has loved %{total} tracks, including %{tracks}%{seemore}")
end
+
m.reply reply % {
:user => user,
:total => loved.size,
:tracks => Utils.comma_list(loved_prep),
- :uri => "http://www.last.fm/user/#{CGI.escape user}/library/loved",
- :seemore => seemore
+ :seemore => seemore % { :uri => "http://www.last.fm/user/#{CGI.escape user}/library/loved" }
}
when :neighbours
nbrs = doc.root.get_elements("neighbours/user").map do |u|
@@ -675,8 +674,7 @@ class LastFmPlugin < Plugin
m.reply reply % {
:user => user,
:nbrs => Utils.comma_list(nbrs.shuffle[0, num]),
- :uri => "http://www.last.fm/user/#{CGI.escape user}/neighbours",
- :seemore => seemore
+ :seemore => seemore % { :uri => "http://www.last.fm/user/#{CGI.escape user}/neighbours" }
}
when :recenttracks
tracks = doc.root.get_elements("recenttracks/track").map do |track|