mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 05:13:16 -07:00
Refactor nzbToMediaDB -> main_db
This commit is contained in:
parent
5d423b0f38
commit
9d9abffdb6
6 changed files with 12 additions and 12 deletions
|
@ -26,7 +26,7 @@ from transmissionrpc.client import Client as TransmissionClient
|
|||
from utorrent.client import UTorrentClient
|
||||
|
||||
import core
|
||||
from core import logger, nzbToMediaDB
|
||||
from core import logger, main_db
|
||||
from core.extractor import extractor
|
||||
|
||||
requests.packages.urllib3.disable_warnings()
|
||||
|
@ -1284,7 +1284,7 @@ def backup_versioned_file(old_file, version):
|
|||
def update_download_info_status(input_name, status):
|
||||
logger.db("Updating status of our download {0} in the DB to {1}".format(input_name, status))
|
||||
|
||||
my_db = nzbToMediaDB.DBConnection()
|
||||
my_db = main_db.DBConnection()
|
||||
my_db.action("UPDATE downloads SET status=?, last_update=? WHERE input_name=?",
|
||||
[status, datetime.date.today().toordinal(), text_type(input_name)])
|
||||
|
||||
|
@ -1292,7 +1292,7 @@ def update_download_info_status(input_name, status):
|
|||
def get_download_info(input_name, status):
|
||||
logger.db("Getting download info for {0} from the DB".format(input_name))
|
||||
|
||||
my_db = nzbToMediaDB.DBConnection()
|
||||
my_db = main_db.DBConnection()
|
||||
sql_results = my_db.select("SELECT * FROM downloads WHERE input_name=? AND status=?",
|
||||
[text_type(input_name), status])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue