]> git.sesse.net Git - pr0n/commitdiff
Handle decimal exposure times -- for instance, it seems like the D70 sometimes
authorSteinar H. Gunderson <sesse@debian.org>
Mon, 14 Jul 2008 17:54:56 +0000 (19:54 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Mon, 14 Jul 2008 17:54:56 +0000 (19:54 +0200)
specifies "0.4" seconds.

perl/Sesse/pr0n/Common.pm

index 73980c0b05738eb2cf97cc5781dd80d8b1737afe..9f9a72f3c86d0823b0f2623fd8aa90587025e33c 100644 (file)
@@ -732,7 +732,7 @@ sub make_infobox {
                my ($a, $b) = ($1, $2);
                my $gcd = gcd($a, $b);
                push @classic_fields, [ $a/$gcd . "/" . $b/$gcd . "s", $shutter_priority ];
-       } elsif (defined($info->{'ExposureTime'}) && $info->{'ExposureTime'} =~ /^(\d+)$/) {
+       } elsif (defined($info->{'ExposureTime'}) && $info->{'ExposureTime'} =~ /^(\d+(?:\.\d+))$/) {
                push @classic_fields, [ $1 . "s", $shutter_priority ];
        }