summaryrefslogtreecommitdiffstats
path: root/image.php
diff options
context:
space:
mode:
authorPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-05-05 01:43:51 +0000
committerPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-05-05 01:43:51 +0000
commite3e4c7246686ff44b84f7d4d48b205c6f780dde4 (patch)
treeca880eef0f820cd04385dc6cf92512d98d1b26ee /image.php
parenta7e1258587ecdc51923a5acb48887b9b4b96efcd (diff)
downloadampache-e3e4c7246686ff44b84f7d4d48b205c6f780dde4.tar.gz
ampache-e3e4c7246686ff44b84f7d4d48b205c6f780dde4.tar.bz2
ampache-e3e4c7246686ff44b84f7d4d48b205c6f780dde4.zip
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.
Diffstat (limited to 'image.php')
-rw-r--r--image.php12
1 files changed, 7 insertions, 5 deletions
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