Parsing discogs better
This commit is contained in:
@@ -9,6 +9,15 @@ class Artist < ActiveRecord::Base
|
||||
def status_str
|
||||
%w(loading ok fail)[self.status]
|
||||
end
|
||||
|
||||
def load_again!
|
||||
albums.each(&:destroy)
|
||||
artist_links.each(&:destroy)
|
||||
artist_aliases.each(&:destroy)
|
||||
self.status = 0
|
||||
save!
|
||||
Delayed::Job.enqueue(LoadArtistJob.new(name))
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
||||
Reference in New Issue
Block a user