mirror of
https://github.com/rembo10/headphones.git
synced 2026-03-21 20:29:27 +00:00
database not allowing duplicates issue
This commit is contained in:
@@ -96,7 +96,7 @@ def searchNZB(albumid=None):
|
||||
urllib.urlopen(saburl)
|
||||
|
||||
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"))
|
||||
conn.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user