Work on import from discogs. Switching to mysql in local dev
This commit is contained in:
+9
-3
@@ -10,12 +10,18 @@ class Discogs
|
||||
end
|
||||
|
||||
def self.process_artist node
|
||||
Artist.new(
|
||||
artist = Artist.new(
|
||||
:name => (node.css('name').first.text),
|
||||
:pic_url => (node.css('images > image[type="primary"]').first.text unless node.css('images > image[type="primary"]').empty?),
|
||||
:status => 1
|
||||
).save
|
||||
p node.css('name').first.text
|
||||
)
|
||||
artist.save
|
||||
node.css('namevariations > name, aliases > name').each do |v|
|
||||
ArtistAlias.new(
|
||||
:artist_id => artist.id,
|
||||
:name => v.text
|
||||
).save
|
||||
end
|
||||
end
|
||||
|
||||
def self.releases
|
||||
|
||||
Reference in New Issue
Block a user