X-Git-Url: https://git.sesse.net/?p=pr0n;a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FCommon.pm;h=8fe17d738f7b9300dda864abe45e6de6bd17a0ea;hp=c6f1c5b59fb87b89c375cde62b3967178dbe4ed8;hb=86ad645e65c1a448941453f9dcbf3df599db1e21;hpb=477d42570558e6d4f197d80ac345d20fbcaef789 diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index c6f1c5b..8fe17d7 100644 --- a/perl/Sesse/pr0n/Common.pm +++ b/perl/Sesse/pr0n/Common.pm @@ -192,7 +192,7 @@ sub update_width_height { # update the last_picture cache as well (this should of course be done # via a trigger, but this is less complicated :-) ) - $dbh->do('UPDATE last_picture_cache SET last_picture=GREATEST(last_picture, ?) FROM images WHERE event=events.id) WHERE id=(SELECT event FROM images WHERE id=?)', + $dbh->do('UPDATE last_picture_cache SET last_picture=GREATEST(last_picture, ?) WHERE event=(SELECT event FROM images WHERE id=?)', undef, $datetime, $id) or die "Couldn't update last_picture in SQL: $!"; } @@ -288,7 +288,6 @@ sub ensure_cached { # NEF files aren't autodetected $fname = "NEF:$fname" if ($filename =~ /\.nef$/i); - $r->log->warn("Generating $fname for $filename"); my $err = $magick->Read($fname); if ($err) { @@ -440,9 +439,11 @@ sub make_infobox { if (defined($info->{'Flash'})) { if ($info->{'Flash'} =~ /did not fire/i || $info->{'Flash'} =~ /no flash/i || - $info->{'Flash'} =~ /not fired/i) { + $info->{'Flash'} =~ /not fired/i || + $info->{'Flash'} =~ /Off/) { push @lines, "No flash"; - } elsif ($info->{'Flash'} =~ /fired/i) { + } elsif ($info->{'Flash'} =~ /fired/i || + $info->{'Flash'} =~ /On/) { push @lines, "Flash"; } else { push @lines, $info->{'Flash'};