diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-12-31 09:46:22 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-12-31 09:46:22 +0000 |
commit | fb3f5189882db644e443ebaf4e5e1efdb84d4348 (patch) | |
tree | 23bb5b6a297102d31a8fcdf56141c8f52f2907d6 /albumart.php | |
parent | 621f007155dc1e3a8a5b916e246018df4a25d4f3 (diff) | |
download | ampache-fb3f5189882db644e443ebaf4e5e1efdb84d4348.tar.gz ampache-fb3f5189882db644e443ebaf4e5e1efdb84d4348.tar.bz2 ampache-fb3f5189882db644e443ebaf4e5e1efdb84d4348.zip |
fixed up install script and updated sql file
Diffstat (limited to 'albumart.php')
-rw-r--r-- | albumart.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/albumart.php b/albumart.php index d7cfbfd4..fd7c7f41 100644 --- a/albumart.php +++ b/albumart.php @@ -29,21 +29,6 @@ and dumps it to the browser as an image mime type. require('modules/init.php'); -$album = new Album($_REQUEST['id']); - -// Check db first -$r = $album->get_art($_REQUEST['fast']); - -if (isset($r->art)) { - $art = $r->art; - $mime = $r->art_mime; - $found = 1; -} -else { - header('Content-type: image/gif'); - readfile(conf('prefix') . conf('theme_path') . "/images/blankalbum.gif"); -} // else no image - /* Decide what size this image is */ switch ($_REQUEST['thumb']) { case '1': @@ -65,6 +50,21 @@ switch ($_REQUEST['type']) { show_template('show_big_art'); break; default: + $album = new Album($_REQUEST['id']); + + // Check db first + $r = $album->get_art($_REQUEST['fast']); + + if (isset($r->art)) { + $art = $r->art; + $mime = $r->art_mime; + } + else { + header('Content-type: image/gif'); + readfile(conf('prefix') . conf('theme_path') . "/images/blankalbum.gif"); + break; + } // else no image + // Print the album art $extension = substr($mime,strlen($mime)-3,3); header("Content-type: $mime"); |