diff options
author | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-05-05 01:43:51 +0000 |
---|---|---|
committer | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-05-05 01:43:51 +0000 |
commit | e3e4c7246686ff44b84f7d4d48b205c6f780dde4 (patch) | |
tree | ca880eef0f820cd04385dc6cf92512d98d1b26ee /image.php | |
parent | a7e1258587ecdc51923a5acb48887b9b4b96efcd (diff) | |
download | ampache-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.php | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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 |