From 625a5abdb6527a584b99c21c69472f07baf96c07 Mon Sep 17 00:00:00 2001 From: Alexandre Morignot <erdnaxeli@gmail.com> Date: Fri, 17 Oct 2014 20:30:24 +0200 Subject: [PATCH] insert duration in db --- lib/sites/parser.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/sites/parser.pm b/lib/sites/parser.pm index a3b8b1d..59e6fb4 100644 --- a/lib/sites/parser.pm +++ b/lib/sites/parser.pm @@ -57,11 +57,12 @@ sub parse { else { # insertion de la vidéo dans la bdd my $sth = $dbh->prepare_cached(' - INSERT INTO playbot (type, url, sender, title) - VALUES (?,?,?,?)'); + INSERT INTO playbot (type, url, sender, title, duration) + VALUES (?,?,?,?,?)'); $log->error("Couldn't prepare querie; aborting") unless (defined $sth); - $sth->execute($content{'site'}, $content{'url'}, $content{'author'}, $content{'title'}) + $sth->execute($content{'site'}, $content{'url'}, + $content{'author'}, $content{'title'}, $content{'duration'}) or $log->error("Couldn't finish transaction: " . $dbh->errstr); } -- GitLab