object @jam_tracks

node do |jam_track|

  id = jam_track['id']
  result = { id: id }

  if @jamtracks_fq_ids.include?("#{id}-44")
    result['44'] = {
                    private: jam_track['private_key_44'],
                    error: jam_track['private_key_44'] ? nil : ( jam_track['jam_track_right_id'] ? 'no_key' : 'not_purchased' )
                   }
  end

  if @jamtracks_fq_ids.include?("#{id}-48")
      result['48'] = {
                      private: jam_track['private_key_48'],
                      error: jam_track['private_key_48'] ? nil : ( jam_track['jam_track_right_id'] ? 'no_key' : 'not_purchased' )
                     }
  end

  # now include mixdown info
  mixdowns_44 = []
  mixdown_info = @jamtrack_mixdowns[id + '-44']
  if mixdown_info
    mixdown_info.each do |mixdown_id|
      mixdowns_44 << {
        id: mixdown_id + '-44',
        private: jam_track['private_key_44'],
        error: jam_track['private_key_44'] ? nil : ( jam_track['jam_track_right_id'] ? 'no_key' : 'not_purchased' )
      }
    end
  end
  result['mixdowns_44'] = mixdowns_44

  # now include mixdown info
  mixdowns_48 = []
  mixdown_info = @jamtrack_mixdowns[id + '-48']
  if mixdown_info
    mixdown_info.each do |mixdown_id|
      mixdowns_48 << {
        id: mixdown_id + '-48',
        private: jam_track['private_key_48'],
        error: jam_track['private_key_48'] ? nil : ( jam_track['jam_track_right_id'] ? 'no_key' : 'not_purchased' )
      }
    end
  end
  result['mixdowns_48'] = mixdowns_48

  result
end