#NEWLINE# def populate_songs_table( db_session , album_id , l ) : #NEWLINE# #INDENT# 'Save the list of songs in the songs table.' #NEWLINE# if ( not l ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# c = db_session . cursor ( ) #NEWLINE# c . execute ( 'DELETE FROM songs WHERE album_id = ?' , [ album_id ] ) #NEWLINE# for song_list in l : #NEWLINE# #INDENT# c . execute ( 'INSERT INTO songs (album_id, song_id, title,\n                track, time, size, artist_name, album_name)\n                VALUES (?,?,?,?,?,?,?,?)' , song_list ) #NEWLINE# #UNINDENT# db_session . commit ( ) #NEWLINE# c . close ( ) #NEWLINE# return True