summaryrefslogtreecommitdiffstats
path: root/videoadd.pl
diff options
context:
space:
mode:
Diffstat (limited to 'videoadd.pl')
-rwxr-xr-xvideoadd.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/videoadd.pl b/videoadd.pl
index eed8b86..add8f2a 100755
--- a/videoadd.pl
+++ b/videoadd.pl
@@ -140,7 +140,7 @@ if (defined $imdb{crit}) {
elsif (defined $file) {
# Fill in at least the title, based on the file name...
$new{title} = basename ($file);
- $new{title} =~ s/.(avi|ogm|ogg|bin|mpe?g|ra?m|mov|asf|wmv)$//;
+ $new{title} =~ s/.(avi|ogm|ogg|bin|mpe?g|ra?m|mov|asf|wmv|mkv)$//i;
}
@@ -209,21 +209,21 @@ unless ( defined $ignoredb_flag ) {
my $INSERT = "INSERT INTO $config{videodata}
SET mediatype = 14";
if (defined $new{filedate}) {
- $INSERT .= ", FROM_UNIXTIME($new{filedate})";
+ $INSERT .= ", filedate = 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";
+ $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 "See the result there: ",
+ print LOG "Check it out! ",
$config{url}, "/show.php?id=", $ids->[0]->[0], "\n"
or die "Can't print: $!";
}