=begin AUTHOR: Kesiev WHAT IT DOES: A pair of new options for making your LastFM experience better. Contextual menus for tuning into artist's stations and personal/neighbours station into the LastFM menu. =end # Personal station and neighbour station on the lastfm menu $menus <<{ :menu=>:lastfm, :label=>"Tune in your Personal station", :action=>Proc.new{ $player.play("lastfm://user/"+URI::encode($opt[:lastfmuser])+"/personal")} } <<{ :menu=>:lastfm, :label=>"Tune in your Neighbours station", :action=>Proc.new{ $player.play("lastfm://user/"+URI::encode($opt[:lastfmuser])+"/neighbours")} } # "Now playing" shortcuts for artists station $menus <<{ :menu=>:song, :label => "LastFM Similiar artists station", :action => Proc.new{ |s| if $player.meta[:artist].to_s!="" && $player.meta[:artist].to_s!=$opt[:unknown] then $player.play("lastfm://artist/"+URI::encode($player.meta[:artist])+"/similarartists") else $statbar.push($statbar.get_context_id("relatedurl"),"Artist name unavailable for \"#{$player.meta[:title]}\".") end } }<<{ :menu=>:song, :label => "LastFM Fan of station", :action => Proc.new{ |s| if $player.meta[:artist].to_s!="" && $player.meta[:artist].to_s!=$opt[:unknown] then $player.play("lastfm://artist/"+URI::encode($player.meta[:artist])+"/fans") else $statbar.push($statbar.get_context_id("relatedurl"),"Artist name unavailable for \"#{$player.meta[:title]}\".") end } } # Popup menus for 'Fan of' and 'Similiar artists' station. $contextactions << { :label => "LastFM Similiar artists station", :verifyer => Proc.new{ |s| s[COLMAP[:artist]].to_s!=""}, :action => Proc.new{ |s| $player.play("lastfm://artist/"+URI::encode(s[COLMAP[:artist]])+"/similarartists") } } << { :label => "LastFM Fan of station", :verifyer => Proc.new{ |s| s[COLMAP[:artist]].to_s!=""}, :action => Proc.new{ |s| $player.play("lastfm://artist/"+URI::encode(s[COLMAP[:artist]])+"/fans") } }