def _logHistoryItem(action, showid, season, episode, quality, resource, provider, version=(-1)):
 logDate = datetime.datetime.today().strftime(History.date_format)
 resource = ss(resource)
 main_db_con = db.DBConnection()
 main_db_con.action('INSERT INTO history (action, date, showid, season, episode, quality, resource, provider, version) VALUES (?,?,?,?,?,?,?,?,?)', [action, logDate, showid, season, episode, quality, resource, provider, version])

def _logHistoryItem ( action , showid , season , episode , quality , resource , provider , version = ( - 1 ) ) : logDate = datetime . datetime . today ( ) . strftime ( History . date_format ) resource = ss ( resource ) main_db_con = db . DBConnection ( ) main_db_con . action ( 'INSERT INTO history (action, date, showid, season, episode, quality, resource, provider, version) VALUES (?,?,?,?,?,?,?,?,?)' , [ action , logDate , showid , season , episode , quality , resource , provider , version ] )
insert a history item in db .