From 950bb3533cf59e074f485dfbb48fcf931e245ea6 Mon Sep 17 00:00:00 2001 From: nil0j Date: Thu, 26 Sep 2024 17:13:42 +0200 Subject: update scrap --- scrap/database.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scrap/database.py') diff --git a/scrap/database.py b/scrap/database.py index 3934361..dab2592 100644 --- a/scrap/database.py +++ b/scrap/database.py @@ -56,15 +56,16 @@ def setup(): def process_albums(album_list): [process_album(album, album_id) - for album_id, album in enumerate(album_list)] + for album_id, album in enumerate(album_list, 1)] def process_album(album, album_id): upload_album(album) - [upload_song(song, album_id+1) for song in album.songs] + [upload_song(song, album_id) for song in album.songs] def upload_album(album): + album.name = album.name.lower() cursor.execute(""" INSERT INTO album ( name, cover, artist_id @@ -99,6 +100,7 @@ def process_artists(artist_names): def process_artist(artist): + artist = artist.lower() cursor.execute(""" INSERT INTO artist ( name -- cgit v1.2.3