]> git.sesse.net Git - pr0n/blobdiff - perl/Sesse/pr0n/Common.pm
We want the human-readable values for the EXIF stuff, not the machine-readable
[pr0n] / perl / Sesse / pr0n / Common.pm
index eff6fc13ecb991196a64fb8ea695708f1cf6d66b..b00810e610d721af181f0db3517f43aa45d5c66f 100644 (file)
@@ -35,7 +35,7 @@ BEGIN {
                require Sesse::pr0n::Config_local;
        };
 
-       $VERSION     = "v2.49";
+       $VERSION     = "v2.50";
        @ISA         = qw(Exporter);
        @EXPORT      = qw(&error &dberror);
        %EXPORT_TAGS = qw();
@@ -259,15 +259,17 @@ sub update_image_info {
                }
 
                # Model/Lens
-               my $model = $exiftool->GetValue('Model', 'ValueConv');
-               my $lens = $exiftool->GetValue('Lens', 'ValueConv');
-               $lens = $exiftool->GetValue('LensSpec', 'ValueConv') if (!defined($lens));
+               my $model = $exiftool->GetValue('Model', 'PrintConv');
+               my $lens = $exiftool->GetValue('Lens', 'PrintConv');
+               $lens = $exiftool->GetValue('LensSpec', 'PrintConv') if (!defined($lens));
 
                $model =~ s/^\s*//;
                $model =~ s/\s*$//;
+               $model = undef if (length($model) == 0);
 
                $lens =~ s/^\s*//;
                $lens =~ s/\s*$//;
+               $lens = undef if (length($lens) == 0);
                
                # Now update the main table with the information we've got
                $dbh->do('UPDATE images SET width=?, height=?, date=?, model=?, lens=? WHERE id=?',