We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 3a9c8daf authored by clint's avatar clint

tagcheck for null

parent 9d7eedaf
......@@ -385,7 +385,10 @@ class JamendoImport:
def tag_exists(self, tag, artist, album, track=None):
try:
self.cursor.execute("SELECT tag FROM Tags WHERE tag = %s AND artist = %s AND album = %s AND track = %s", (tag, artist, album, track))
if track:
self.cursor.execute("SELECT tag FROM Tags WHERE tag = %s AND artist = %s AND album = %s AND track = %s", (tag, artist, album, track))
else:
self.cursor.execute("SELECT tag FROM Tags WHERE tag = %s AND artist = %s AND album = %s AND track IS NULL", (tag, artist, album))
return self.cursor.rowcount != 0
except:
return False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment