added mover module

This commit is contained in:
Remy
2011-05-24 21:20:04 -07:00
parent 02ae22c81a
commit 1aed8efd93
4 changed files with 37 additions and 10 deletions
+4 -4
View File
@@ -1,12 +1,12 @@
import urllib
from webServer import database
from webServer import database, config_file
from configobj import ConfigObj
import string
import feedparser
import sqlite3
import re
config = ConfigObj('config.ini')
config = ConfigObj(config_file)
General = config['General']
NZBMatrix = config['NZBMatrix']
SABnzbd = config['SABnzbd']
@@ -95,8 +95,8 @@ 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 (Title TEXT UNIQUE, Size INTEGER, URL TEXT, DateAdded TEXT)')
c.execute('INSERT INTO snatched VALUES( ?, ?, ?, CURRENT_DATE)', (bestqual[0], bestqual[1], bestqual[2]))
c.execute('CREATE TABLE IF NOT EXISTS snatched (AlbumID, Title TEXT UNIQUE, 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()
else: