diff --git a/app/controllers/last_fm_controller.rb b/app/controllers/last_fm_controller.rb index 49f5a76..c8b52b7 100644 --- a/app/controllers/last_fm_controller.rb +++ b/app/controllers/last_fm_controller.rb @@ -88,13 +88,13 @@ class LastFmController < ApplicationController :timestamp => Time.now.utc.to_i, :artist => params[:artist], :album => params[:album], - :trackNumber => params[:position], + :trackNumber => params[:position].to_i, # :mbid => params[:mbid], - :duration => params[:length], + :duration => params[:length].to_i, :sk => user.lastfm_key # Auth session key ) - render :json => { :status => r['error'].nil? ? 'success' : 'failed' } + render :json => { :status => r['error'].nil? ? 'success' : r } return end end