* a fix for linux? hfa code

This commit is contained in:
Seth Call 2015-08-19 08:29:22 -05:00
parent 3fa58715fc
commit 87c62b4db2
2 changed files with 6 additions and 2 deletions

View File

@ -440,6 +440,10 @@ module JamRuby
jam_track.sales_region = 'Worldwide'
jam_track.recording_type = 'Cover'
jam_track.description = "This is a JamTrack audio file for use exclusively with the JamKazam service. This JamTrack is a high quality cover of the #{jam_track.original_artist} song \"#{jam_track.name}\"."
jam_track.hfa_license_status = false
jam_track.alternative_license_status = false
jam_track.hfa_license_desired = true
jam_track.server_fixation_date = Time.now
if is_tency_storage?
jam_track.vendor_id = metadata[:id]

View File

@ -11,7 +11,7 @@ module JamRuby
# look through all jam_track requests, and find the highest one that is associated with an approved harry fox requests
def self.find_max()
max = JamTrackHfaRequestId.select('max(request_id) as max').joins('INNER JOIN jam_track_hfa_requests ON jam_track_hfa_requests.id = jam_track_hfa_request_id').where('received_at IS NOT NULL').first()['max']
max = JamTrackHfaRequestId.select('coalesce(max(request_id), 0) as max').joins('INNER JOIN jam_track_hfa_requests ON jam_track_hfa_requests.id = jam_track_hfa_request_id').where('received_at IS NOT NULL').first()['max']
max.to_i
end
@ -35,7 +35,7 @@ module JamRuby
request_id.jam_track = jam_track
request_id.jam_track_hfa_request = request
request_id.request_id = start
start += start + 1
start += 1
request_id.save
request_id.reload # to get back the request_id attribute
requests << request_id