Beispiel #1
0
def get_downloadInfo(inputName, status):
    logger.db("Getting download info for %s from the DB" % (inputName))

    myDB = nzbToMediaDB.DBConnection()
    sqlResults = myDB.select("SELECT * FROM downloads WHERE input_name=? AND status=?",
                             [unicode(inputName), status])

    return sqlResults
def get_downloadInfo(inputName, status):
    logger.db("Getting download info for %s from the DB" % (inputName))

    myDB = nzbToMediaDB.DBConnection()
    sqlResults = myDB.select("SELECT * FROM downloads WHERE input_name=? AND status=?",
                             [unicode(inputName), status])

    return sqlResults
Beispiel #3
0
def update_downloadInfoStatus(inputName, status):
    logger.db("Updating status of our download %s in the DB to %s" %
              (inputName, status))

    myDB = nzbToMediaDB.DBConnection()
    myDB.action(
        "UPDATE downloads SET status=?, last_update=? WHERE input_name=?",
        [status, datetime.date.today().toordinal(),
         unicode(inputName)])
def update_downloadInfoStatus(inputName, status):
    logger.db("Updating status of our download %s in the DB to %s" % (inputName, status))

    myDB = nzbToMediaDB.DBConnection()
    myDB.action("UPDATE downloads SET status=?, last_update=? WHERE input_name=?",
                [status, datetime.date.today().toordinal(), unicode(inputName)])
Beispiel #5
0
def get_download_info(input_name, status):
    msg = 'Getting download info for {0} from the DB'
    action = 'SELECT * FROM downloads WHERE input_name=? AND status=?'
    args = [text_type(input_name), status]
    logger.db(msg.format(input_name))
    return database.select(action, args)
Beispiel #6
0
def update_download_info_status(input_name, status):
    msg = 'Updating DB download status of {0} to {1}'
    action = 'UPDATE downloads SET status=?, last_update=? WHERE input_name=?'
    args = [status, datetime.date.today().toordinal(), text_type(input_name)]
    logger.db(msg.format(input_name, status))
    database.action(action, args)
Beispiel #7
0
def update_download_info_status(input_name, status):
    msg = 'Updating DB download status of {0} to {1}'
    action = 'UPDATE downloads SET status=?, last_update=? WHERE input_name=?'
    args = [status, datetime.date.today().toordinal(), text_type(input_name)]
    logger.db(msg.format(input_name, status))
    database.action(action, args)
Beispiel #8
0
def get_download_info(input_name, status):
    msg = 'Getting download info for {0} from the DB'
    action = 'SELECT * FROM downloads WHERE input_name=? AND status=?'
    args = [text_type(input_name), status]
    logger.db(msg.format(input_name))
    return database.select(action, args)