Insert album entries into database

master
Sven Slootweg 13 years ago
parent aceed2731e
commit 31671cb2a7

@ -90,6 +90,7 @@ for event, element in iterparse(xml, tag="artist"):
albummbgid = get_attribute(album, 'mbgid') albummbgid = get_attribute(album, 'mbgid')
albumartworklicense = get_attribute(album, 'license_artwork') albumartworklicense = get_attribute(album, 'license_artwork')
cursor.execute("INSERT INTO albums VALUES (?, ?, ?, ?, ?, ?, ?, ?)", (albumid, albumname, albumurl, albumrelease, albumfilename, albummbgid, albumartworklicense))
print " -> Album: %s (%s) at %s" % (albumname, albumrelease, albumurl) print " -> Album: %s (%s) at %s" % (albumname, albumrelease, albumurl)
for track in album.find('Tracks'): for track in album.find('Tracks'):

Loading…
Cancel
Save