]> git.sesse.net Git - pr0n/blobdiff - perl/update-image-cache.pl
Render the infobox on the client side.
[pr0n] / perl / update-image-cache.pl
index 0ed6931bfe63ca4a2fcf648fa3e03202d765360b..f50d3a0b046b5539d820bbe8365a52dbc398845e 100755 (executable)
@@ -103,7 +103,6 @@ while (my $ref = $q->fetchrow_hashref) {
        if (!$regen_mipmaps) {
                @files = grep { !/mipmap/ } @files;
        }
-       my @boxres = ();
        my @noboxres = ();
        my $any_old = 0;
        for my $c (@files) {
@@ -113,8 +112,6 @@ while (my $ref = $q->fetchrow_hashref) {
                }
                if ($c =~ /$id-(\d+)-(\d+)-nobox\.jpg/ || $c =~ /$id-(-1)-(-1)-nobox\.jpg/) {
                        push @noboxres, [$1, $2];
-               } elsif ($c =~ /$id-(\d+)-(\d+)-box\.png/ || $c =~ /$id-(-1)-(-1)-box\.png/) {
-                       push @boxres, [$1, $2];
                }
        }
        next unless $any_old;
@@ -122,9 +119,6 @@ while (my $ref = $q->fetchrow_hashref) {
        if (scalar @noboxres > 0) {
                Sesse::pr0n::Common::ensure_cached($r, $ref->{'filename'}, $id, $ref->{'width'}, $ref->{'height'}, sort_res(@noboxres));
        }
-       if (scalar @boxres > 0) {
-               Sesse::pr0n::Common::ensure_infobox_cached($r, $ref->{'filename'}, $id, $ref->{'width'}, $ref->{'height'}, 1, sort_res(@boxres));
-       }
        
        my @newfiles = glob("../cache/$dir/$id-*.jpg");
        my %a = map { $_ => 1 } @files;