X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Flastfm.rb;h=811a63aa1dc5e6057948aa007082dde4b65d0d94;hb=a8c44e2aaf451bf7ecae317b9b75d86f770413fc;hp=52f9754ec524d4fdcaa73dd8caad943610fde395;hpb=a14e483f44d0c99b55e762c5ed39c990c3549c68;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb index 52f9754e..811a63aa 100644 --- a/data/rbot/plugins/lastfm.rb +++ b/data/rbot/plugins/lastfm.rb @@ -441,8 +441,9 @@ class LastFmPlugin < Plugin def lastfm(m, params) action = case params[:action] - when "neighbors" then "neighbours" - when "recentracks" then "recenttracks" + when "neighbors" then "neighbours" + when "recentracks", "recent" then "recenttracks" + when "loved" then "lovedtracks" when /^weekly(track|album|artist)s$/ "weekly#{$1}chart" when "events" @@ -581,7 +582,7 @@ class LastFmPlugin < Plugin format = "%{artist} (%{bold}%{plays}%{bold})" artist = item.elements["name"].text when :toptracks, :topalbums - format = "%{artist} - (%{title} %{bold}%{plays}%{bold})" + format = "%{artist} - %{title} (%{bold}%{plays}%{bold})" artist = item.elements["artist/name"].text end @@ -620,7 +621,7 @@ plugin.map 'lastfm compare to :user2', :action => :tasteometer, :thread => true plugin.map 'lastfm compare [:user1] [to] :user2', :action => :tasteometer, :thread => true plugin.map "lastfm [user] [:num] :action [:user]", :thread => true, :requirements => { :action => - /^(?:events|shouts|friends|neighbou?rs|(?:loved|recent?)tracks|top(?:album|artist|track)s?|weekly(?:albums?|artists?|tracks?)(?:chart)?)$/ + /^(?:events|shouts|friends|neighbou?rs|loved(?:tracks)?|recent(?:t?racks)?|top(?:album|artist|track)s?|weekly(?:albums?|artists?|tracks?)(?:chart)?)$/ } plugin.map 'lastfm [user] [:num] :action [:user] over [*period]', :thread => true, :requirements => {