def get_song_dict(db_session, album_id):
    song_dict = {}
    try:
        c = db_session.cursor()
        c.execute("""SELECT song_id, title, track, time, size, artist_name, album_name FROM songs
            WHERE album_id = ? order by track""", [album_id])
        for row in c:
            song_id     = row[0]
            song_title  = row[1]
            song_track  = row[2]
            song_time   = row[3]
            song_size   = row[4]
            artist_name = row[5]
            album_name  = row[6]
            song_dict[song_id] = {  'title' : song_title,
                            'track' : song_track,
                            'time'  : song_time,
                            'size'  : song_size,
                            'artist_name' : artist_name,
                            'album_name'  : album_name,
                        }
    except:
        song_dict = None
    #db_session.commit()
    c.close()
    return song_dict
Returns a dictionary of all the songs from an album from the database
dataset/ETHPy150Open bahamas10/Viridian/AmpacheTools/dbfunctions.py/get_song_dict