X-Git-Url: https://git.sesse.net/?p=pr0n;a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FCommon.pm;h=c4ceba03fde8e2207803aa2184524905b42ec7a3;hp=0569ef90fbd3bdb37a32c97a775e3759ac0ffb49;hb=7f9a98a7707de6c25a2e572ee3d34365b596ea83;hpb=09260885c52013320acd21d7ce262e12def7301f diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index 0569ef9..c4ceba0 100644 --- a/perl/Sesse/pr0n/Common.pm +++ b/perl/Sesse/pr0n/Common.pm @@ -304,25 +304,6 @@ sub update_image_info { undef, $width, $height, $datetime, $model, $lens, $id) or die "Couldn't update width/height in SQL: $!"; - # 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: $!"; - - $q = $dbh->prepare('INSERT INTO tags (image,tag) VALUES (?,?)') - or die "Couldn't prepare inserting tag information: $!"; - - - for my $tag (@tags) { - $q->execute($id, guess_charset($tag)) - or die "Couldn't insert tag information in database: $!"; - } - # update the last_picture cache as well (this should of course be done # via a trigger, but this is less complicated :-) ) $dbh->do('UPDATE last_picture_cache SET last_picture=GREATEST(last_picture, ?),last_update=CURRENT_TIMESTAMP WHERE (vhost,event)=(SELECT vhost,event FROM images WHERE id=?)',