summaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/track.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/models/track.py b/models/track.py
index 896a29a..4d06872 100644
--- a/models/track.py
+++ b/models/track.py
@@ -364,11 +364,15 @@ class Track:
musicbrainz_artistid = ?""",
(musicbrainz_artistid,))
row = rows.fetchone()
+ if not row:
+ rows = c.execute("""SELECT * FROM artist WHERE
+ name = ? AND musicbrainz_artistid IS NULL""",
+ (artist_name,))
+ row = rows.fetchone()
if not row:
rows = c.execute("""SELECT * FROM artist WHERE
- name = ? AND musicbrainz_artistid IS NULL""",
- (artist_name,))
+ name = ?""", (artist_name,))
row = rows.fetchone()
if row:
@@ -376,7 +380,7 @@ class Track:
sortname=row[2],
musicbrainz_artistid=row[3])
- if (musicbrainz_artistid and
+ if (musicbrainz_artistid and
(not hasattr(artist, "musicbrainz_artistid")
or not artist.musicbrainz_artistid)):
c.execute("""UPDATE artist SET