]> git.sesse.net Git - pr0n/blobdiff - perl/Sesse/pr0n/Common.pm
Try XMP-dc:Subject if Keywords does not work. Patch from xim.
[pr0n] / perl / Sesse / pr0n / Common.pm
index 559d6339f38b206498902f801ffa721d777c6593..7375c3cf8f8174a0e90d5753295b1f87895977c5 100644 (file)
@@ -308,6 +308,10 @@ sub update_image_info {
                
                # Tags
                my @tags = $exiftool->GetValue('Keywords', 'ValueConv');
+               if (scalar @tags == 0) {
+                       # This is XMP-dc:Subject, an RDF bag of tags.
+                       @tags = $exiftool->GetValue('Subject', 'ValueConv');
+               }
                $dbh->do('DELETE FROM tags WHERE image=?',
                        undef, $id)
                        or die "Couldn't delete old tag information in SQL: $!";