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 #2
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
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)])