diff options
-rwxr-xr-x | videoadd.pl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/videoadd.pl b/videoadd.pl index fb978ad..eed8b86 100755 --- a/videoadd.pl +++ b/videoadd.pl @@ -208,21 +208,23 @@ if ( defined($file) ) { unless ( defined $ignoredb_flag ) { my $INSERT = "INSERT INTO $config{videodata} SET mediatype = 14"; - if (defined $config{filedate}) { - $INSERT .= ", FROM_UNIXTIME($config{filedate})"; - delete $config{filedate}; + if (defined $new{filedate}) { + $INSERT .= ", FROM_UNIXTIME($new{filedate})"; + delete $new{filedate}; } while (my ($k,$v) = each %new) { $INSERT .= ", " .$k. " = " .$dbh->quote ($v); } # $dbh->do($INSERT) or die "Can't insert: $!\n"; + print $INSERT, "\n"; my $ids = $dbh->selectall_arrayref ( "SELECT id FROM $config{videodata} WHERE filename = ? ", undef, $new{filename} ); if ($#$ids == 0) { - print LOG $config{url}, "/show.php?id=", $ids->[0]->[0], "\n" + print LOG "See the result there: ", + $config{url}, "/show.php?id=", $ids->[0]->[0], "\n" or die "Can't print: $!"; } else { |