From e3e4c7246686ff44b84f7d4d48b205c6f780dde4 Mon Sep 17 00:00:00 2001 From: Paul 'flowerysong' Arthur Date: Wed, 5 May 2010 01:43:51 +0000 Subject: Art work. Rationalise DB schema, support multiple thumbnail sizes and caching thereof, call Catalog->gather_art instead of Catalog->gather_album_art, unbreak (hopefully) gather_musicbrainz. --- image.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'image.php') diff --git a/image.php b/image.php index ac91ad79..267e6f14 100644 --- a/image.php +++ b/image.php @@ -102,11 +102,13 @@ switch ($_GET['type']) { readfile(Config::get('prefix') . Config::get('theme_path') . '/images/blankalbum.jpg'); break; } // else no image - - if (!$art->thumb_mime) { unset($_GET['thumb']); } - - $mime = $_GET['thumb'] ? $art->thumb_mime : $art->raw_mime; - $source = $_GET['thumb'] ? $art->thumb : $art->raw; + + if ($_GET['thumb']) { + $thumb_data = $art->get_thumb($size); + } + + $mime = $thumb_data ? $thumb_data['thumb_mime'] : $art->raw_mime; + $source = $thumb_data ? $thumb_data['thumb'] : $art->raw; $extension = Art::extension($mime); // Send the headers and output the image -- cgit