lib/ayadn/nowplaying.rb in ayadn-2.0 vs lib/ayadn/nowplaying.rb in ayadn-2.0.1
- old
+ new
@@ -18,10 +18,11 @@
unless options[:text]
@custom_text = nil
else
@custom_text = "\n \n#{options[:text].join(' ')}"
end
+ @affiliate_suffix = "&at=1l3vtb8&ct=ayadn"
end
def lastfm options
begin
user = Settings.options[:nowplaying][:lastfm] || create_lastfm_user()
@@ -225,10 +226,10 @@
return {
'code' => 200,
'artist' => candidate['artistName'],
'track' => candidate['trackName'],
'preview' => candidate['previewUrl'],
- 'link' => candidate['collectionViewUrl'],
+ 'link' => "#{candidate['collectionViewUrl']}#{@affiliate_suffix}",
'artwork' => candidate['artworkUrl100'].gsub('100x100', '1200x1200'),
'artwork_thumb' => candidate['artworkUrl100'].gsub('100x100', '600x600'),
'request' => url,
'results' => results
}