Merge branch 'master' of github.com:magnolia-fan/BeatHaven
This commit is contained in:
@@ -15,7 +15,7 @@ class ArtistController < ApplicationController
|
||||
if results.empty?
|
||||
return render json: { status: 'not_found' }
|
||||
end
|
||||
best_match = results[0][:name]
|
||||
best_match = results[0][:sort_name]
|
||||
if best_match != artist_name and similar_names(artist_name, best_match)
|
||||
return render json: { status: 'corrected', correct_name: best_match }
|
||||
elsif best_match == artist_name
|
||||
|
||||
@@ -38,8 +38,9 @@ class ImportController < ApplicationController
|
||||
artist.pic_url = lastfm_artist['artist']['image'][3]['#text']
|
||||
artist.listeners = lastfm_artist['artist']['stats']['listeners']
|
||||
artist.artist_type = brainz_artist.type
|
||||
artist.original_name = brainz_artist.name
|
||||
artist.mbid = brainz_artist.id
|
||||
artist.save
|
||||
artist.save!
|
||||
|
||||
brainz_artist.urls.each do |service, url|
|
||||
ArtistLink.new(
|
||||
|
||||
@@ -18,7 +18,7 @@ class TrackController < ApplicationController
|
||||
def report_unavailable
|
||||
track = Track.find(params[:id])
|
||||
unless track.nil? or track.available
|
||||
track.available = true
|
||||
track.available = false
|
||||
track.save
|
||||
return render :json => { :status => :success }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user