librefm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-commits] [1545] tagcheck for null


From: Clint Adams
Subject: [Librefm-commits] [1545] tagcheck for null
Date: Wed, 13 May 2009 22:43:41 +0000

Revision: 1545
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1545
Author:   clint
Date:     2009-05-13 22:43:41 +0000 (Wed, 13 May 2009)
Log Message:
-----------
tagcheck for null

Modified Paths:
--------------
    trunk/scripts/import-jamendo.py

Modified: trunk/scripts/import-jamendo.py
===================================================================
--- trunk/scripts/import-jamendo.py     2009-05-13 22:41:49 UTC (rev 1544)
+++ trunk/scripts/import-jamendo.py     2009-05-13 22:43:41 UTC (rev 1545)
@@ -385,7 +385,10 @@
 
        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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]