Show status line at end of artist insertion

master
Sven Slootweg 12 years ago
parent 07749fedf7
commit 0452ece43f

@ -79,7 +79,6 @@ for event, element in iterparse(xml, tag="artist"):
location = get_attribute(element, 'location') location = get_attribute(element, 'location')
cursor.execute("INSERT INTO artists VALUES (?, ?, ?, ?, ?, ?)", (artistid, name, url, image, mbgid, location)) cursor.execute("INSERT INTO artists VALUES (?, ?, ?, ?, ?, ?)", (artistid, name, url, image, mbgid, location))
print "[%s] %s from %s (image: %s)" % (artistid, name, location, image)
for album in element.find('Albums'): for album in element.find('Albums'):
# id, name, url, releasedate, filename, mbgid, license_artwork, Tracks # id, name, url, releasedate, filename, mbgid, license_artwork, Tracks
@ -114,4 +113,6 @@ for event, element in iterparse(xml, tag="artist"):
tagweight = get_attribute(tag, 'weight') tagweight = get_attribute(tag, 'weight')
cursor.execute("INSERT INTO tags VALUES (?, ?, ?)", (trackid, tagid, tagweight)) cursor.execute("INSERT INTO tags VALUES (?, ?, ?)", (trackid, tagid, tagweight))
print "Inserted %s into database" % (name,)
element.clear() element.clear()

Loading…
Cancel
Save