diff options
author | Raine Virta <rane@kapsi.fi> | 2009-02-19 03:45:52 +0200 |
---|---|---|
committer | Raine Virta <rane@kapsi.fi> | 2009-02-19 03:54:35 +0200 |
commit | a8c44e2aaf451bf7ecae317b9b75d86f770413fc (patch) | |
tree | 22b93cae77a1e3b8c287bc4f7e72368748253115 /data/rbot | |
parent | 117fc578fe79f97ab6de26679d8cfd2755aaddc6 (diff) |
lastfm: make "tracks" optional in mappings for lovedtracks and recenttracks
Diffstat (limited to 'data/rbot')
-rw-r--r-- | data/rbot/plugins/lastfm.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb index 8742e4f7..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" @@ -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 => { |