'Record last propersearch in DB
:param when: When was the last proper search'

def _set_lastProperSearch(self, when):

    sickrage.srCore.srLogger.debug((u'Setting    the    last    proper    search    in    database    to    ' + str(when)))
    dbData = [x[u'doc'] for x in sickrage.srCore.mainDB.db.all(u'info', with_doc=True)]
    if (len(dbData) == 0):
        sickrage.srCore.mainDB.db.insert({u'_t': u'info', u'last_backlog': 0, u'last_indexer': 0, u'last_proper_search': str(when)})
    else:
        dbData[0][u'last_proper_search'] = str(when)
        sickrage.srCore.mainDB.db.update(dbData[0])
