mirror of
https://github.com/rembo10/headphones.git
synced 2026-03-24 21:59:26 +00:00
fixed issue with database being created without tables
This commit is contained in:
@@ -30,9 +30,8 @@ else:
|
||||
|
||||
def searchNZB(albumid=None):
|
||||
|
||||
if os.path.exists(database):
|
||||
conn=sqlite3.connect(database)
|
||||
c=conn.cursor()
|
||||
conn=sqlite3.connect(database)
|
||||
c=conn.cursor()
|
||||
|
||||
if albumid:
|
||||
c.execute('SELECT ArtistName, AlbumTitle, AlbumID, ReleaseDate from albums WHERE Status="Wanted" AND AlbumID="%s"' % albumid)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from cherrypy.process.plugins import SimplePlugin
|
||||
from apscheduler.scheduler import Scheduler
|
||||
|
||||
import os
|
||||
import time
|
||||
import threading
|
||||
import Queue
|
||||
@@ -32,6 +34,8 @@ class threadtool(SimplePlugin):
|
||||
import updater
|
||||
import searcher
|
||||
import mover
|
||||
#self.sched.add_cron_job(updater.dbUpdate, hour=3)
|
||||
#self.sched.add_interval_job(searcher.searchNZB, hours=18)
|
||||
#self.sched.add_interval_job(mover.moveFiles, minutes=10)
|
||||
from webServer import database
|
||||
if os.path.exists(database):
|
||||
self.sched.add_cron_job(updater.dbUpdate, hour=3)
|
||||
self.sched.add_interval_job(searcher.searchNZB, hours=18)
|
||||
#self.sched.add_interval_job(mover.moveFiles, minutes=10)
|
||||
|
||||
Reference in New Issue
Block a user