X-Git-Url: https://git.sesse.net/?p=pr0n;a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FCommon.pm;h=34ee8d9c7abcd2f58dced0d6001553c209e358f6;hp=828df6a91466a4b9883e92b5d469efe4baa2a07d;hb=6170d7a868e3fe5765600166e8cdad487cd6c103;hpb=04cab7c72227c290224ab0c0b0a52c0893516552 diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index 828df6a..34ee8d9 100644 --- a/perl/Sesse/pr0n/Common.pm +++ b/perl/Sesse/pr0n/Common.pm @@ -682,7 +682,7 @@ sub read_original_image { # If we use ->[0] unconditionally, text rendering (!) seems to crash my $img; - if (ref($magick)) { + if (ref($magick) !~ /Image::Magick/) { $img = $magick; } else { $img = (scalar @$magick > 1) ? $magick->[0] : $magick; @@ -1128,10 +1128,12 @@ sub get_all_cache_urls { push @ret, "/$event/$1x$2/$filename"; } elsif ($fname =~ /^$id-(\d+)-(\d+)-nobox\.jpg$/) { push @ret, "/$event/$1x$2/nobox/$filename"; + } elsif ($fname =~ /^$id--1--1-box\.png$/) { + push @ret, "/$event/box/$filename"; } elsif ($fname =~ /^$id-(\d+)-(\d+)-box\.png$/) { push @ret, "/$event/$1x$2/box/$filename"; } else { - $r->log->warning("Couldn't find a purging URL for $fname"); + $r->log->warn("Couldn't find a purging URL for $fname"); } }