Trim the EXIF values; seems like the Pentax K10D sometimes adds extra spaces
authorSteinar H. Gunderson <sesse@debian.org>
Mon, 26 Mar 2007 20:33:08 +0000 (22:33 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Mon, 26 Mar 2007 20:33:08 +0000 (22:33 +0200)
after its model.

perl/Sesse/pr0n/Index.pm

index 737eba6e7f908a42fa0cd7a57d225297ff919ee2..5a635d4c190aac8a5fff7e9fc3a05c1ae4aa25b8 100644 (file)
@@ -156,8 +156,8 @@ sub handler {
                # Find the equipment used
                my $eq = $dbh->prepare('
                        SELECT 
-                               model.value AS model,
-                               coalesce(lens_spec.value, lens.value) AS lens,
+                               TRIM(model.value) AS model,
+                               coalesce(TRIM(lens_spec.value), TRIM(lens.value)) AS lens,
                                COUNT(*) AS num
                        FROM images i
                                LEFT JOIN exif_info model ON i.id=model.image