diff --git a/ruby/lib/jam_ruby/models/jam_track_right.rb b/ruby/lib/jam_ruby/models/jam_track_right.rb index e02399663..e940b4f2b 100644 --- a/ruby/lib/jam_ruby/models/jam_track_right.rb +++ b/ruby/lib/jam_ruby/models/jam_track_right.rb @@ -60,7 +60,7 @@ module JamRuby end def verify_download_count - if (self.download_count < 0 || self.download_count > MAX_JAM_TRACK_DOWNLOADS) && !@current_user.admin + if (self.download_count < 0 || self.download_count > MAX_JAM_TRACK_DOWNLOADS) && !self.user.admin errors.add(:download_count, "must be less than or equal to #{MAX_JAM_TRACK_DOWNLOADS}") end end diff --git a/web/app/controllers/api_jam_tracks_controller.rb b/web/app/controllers/api_jam_tracks_controller.rb index ff7cbf6f2..8c63530de 100644 --- a/web/app/controllers/api_jam_tracks_controller.rb +++ b/web/app/controllers/api_jam_tracks_controller.rb @@ -214,10 +214,12 @@ class ApiJamTracksController < ApiController @jam_track_right.first_downloaded_at = now if @jam_track_right.first_downloaded_at.nil? @jam_track_right.save! - is_jamblaster = !!params[:is_jamblaster] + #is_jamblaster = !!params[:is_jamblaster] # if it's not the jamblaster, keep the URL https - redirect_to @jam_track_right.sign_url(120, sample_rate, !is_jamblaster) + # 2023: just kidding -- ignoring jamblaster code right now. + # always send https url back to client + redirect_to @jam_track_right.sign_url(120, sample_rate, true) else @jam_track_right.enqueue_if_needed(sample_rate) render :json => { :message => "not available, digitally signing Jam Track offline." }, :status => 202