mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-19 23:44:01 +01:00
database not allowing duplicates issue
This commit is contained in:
+1
-1
@@ -96,7 +96,7 @@ def searchNZB(albumid=None):
|
|||||||
urllib.urlopen(saburl)
|
urllib.urlopen(saburl)
|
||||||
|
|
||||||
c.execute('UPDATE albums SET status = "Snatched" WHERE AlbumID="%s"' % albums[2])
|
c.execute('UPDATE albums SET status = "Snatched" WHERE AlbumID="%s"' % albums[2])
|
||||||
c.execute('CREATE TABLE IF NOT EXISTS snatched (AlbumID, Title TEXT UNIQUE, Size INTEGER, URL TEXT, DateAdded TEXT, Status TEXT)')
|
c.execute('CREATE TABLE IF NOT EXISTS snatched (AlbumID, Title TEXT, Size INTEGER, URL TEXT, DateAdded TEXT, Status TEXT)')
|
||||||
c.execute('INSERT INTO snatched VALUES( ?, ?, ?, ?, CURRENT_DATE, ?)', (albums[2], bestqual[0], bestqual[1], bestqual[2], "Snatched"))
|
c.execute('INSERT INTO snatched VALUES( ?, ?, ?, ?, CURRENT_DATE, ?)', (albums[2], bestqual[0], bestqual[1], bestqual[2], "Snatched"))
|
||||||
conn.commit()
|
conn.commit()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user