]> git.sesse.net Git - pr0n/commitdiff
Extract the number only from the ISO value.
authorSteinar H. Gunderson <sesse@debian.org>
Sat, 19 Jan 2008 22:25:33 +0000 (23:25 +0100)
committerSteinar H. Gunderson <sesse@debian.org>
Sat, 19 Jan 2008 22:25:33 +0000 (23:25 +0100)
perl/Sesse/pr0n/Common.pm

index 3463fe61067930c087fd83943be7e5c3b71368dd..e339fd3ab596026f33390cdefa97579ecce2a249 100644 (file)
@@ -557,12 +557,16 @@ sub make_infobox {
 
 #      Apache2::ServerUtil->server->log_error(join(':', keys %$info));
 
 
 #      Apache2::ServerUtil->server->log_error(join(':', keys %$info));
 
+       my $iso = undef;
        if (defined($info->{'NikonD1-ISOSetting'})) {
        if (defined($info->{'NikonD1-ISOSetting'})) {
-               push @classic_fields, [ $info->{'NikonD1-ISOSetting'}->[1] . " ISO", 0 ];
+               $iso = $info->{'NikonD1-ISOSetting'};
        } elsif (defined($info->{'ISO'})) {
        } elsif (defined($info->{'ISO'})) {
-               push @classic_fields, [ $info->{'ISO'} . " ISO" ];
+               $iso = $info->{'ISO'};
        } elsif (defined($info->{'ISOSetting'})) {
        } elsif (defined($info->{'ISOSetting'})) {
-               push @classic_fields, [ $info->{'ISOSetting'} . " ISO" ];
+               $iso = $info->{'ISOSetting'};
+       }
+       if (defined($iso) && $iso =~ /(\d+)/) {
+               push @classic_fields, [ $1 . " ISO", 0 ];
        }
 
        if (defined($info->{'ExposureBiasValue'}) && $info->{'ExposureBiasValue'} ne "0") {
        }
 
        if (defined($info->{'ExposureBiasValue'}) && $info->{'ExposureBiasValue'} ne "0") {