diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2012-12-27 23:29:26 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2012-12-27 23:29:26 +0100 |
commit | 30f9ffeef17eca38831cbac3cbf422b73ad458e6 (patch) | |
tree | 230c8a61b7194b812fbe2964d775896d021048fc /db.py | |
parent | 342d0cbd14cc33e8ee86b783c53e7001c41fb94c (diff) |
Diffstat (limited to 'db.py')
-rw-r--r-- | db.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -153,7 +153,8 @@ class Track(Base): @staticmethod def get(session, name, num, filename, file_index, directory_id, artist_id, album_id): try: - track = session.query(Track).filter(and_(Track.filename == filename, Track.file_index == file_index)).one() + track = session.query(Track).filter(and_(Track.name == name, Track.filename == filename, Track.file_index == file_index, + Track.artist_id == artist_id, Track.album_id == album_id)).one() except NoResultFound: track = Track(name, num, filename, file_index, directory_id, artist_id, album_id) session.add(track) |