diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-12-31 09:04:30 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-12-31 09:04:30 +0000 |
commit | 621f007155dc1e3a8a5b916e246018df4a25d4f3 (patch) | |
tree | c3f987cc3d43d8fdfac0680fd23cd3695fbac30a /albumart.php | |
parent | fe4774127f292ce94ab79771bc72cbb7ca4db371 (diff) | |
download | ampache-621f007155dc1e3a8a5b916e246018df4a25d4f3.tar.gz ampache-621f007155dc1e3a8a5b916e246018df4a25d4f3.tar.bz2 ampache-621f007155dc1e3a8a5b916e246018df4a25d4f3.zip |
add album art pop-up mojo from Di-Fosfor
Diffstat (limited to 'albumart.php')
-rw-r--r-- | albumart.php | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/albumart.php b/albumart.php index 7e97426a..d7cfbfd4 100644 --- a/albumart.php +++ b/albumart.php @@ -29,7 +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 @@ -40,6 +39,10 @@ if (isset($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']) { @@ -57,23 +60,22 @@ switch ($_REQUEST['thumb']) { break; } -if (!$found) { - // Print a transparent gif instead - header('Content-type: image/gif'); - readfile(conf('prefix') . conf('theme_path') . "/images/blankalbum.gif"); -} -else { - // Print the album art - $extension = substr($mime,strlen($mime)-3,3); - header("Content-type: $mime"); - header("Content-Disposition: filename=" . $album->name . "." . $extension); - - if (!$_REQUEST['thumb']) { - echo $art; - } - elseif (!img_resize($art,$size,$extension)) { - echo $art; - } -} +switch ($_REQUEST['type']) { + case 'popup': + show_template('show_big_art'); + break; + default: + // Print the album art + $extension = substr($mime,strlen($mime)-3,3); + header("Content-type: $mime"); + header("Content-Disposition: filename=" . $album->name . "." . $extension); + if (!$_REQUEST['thumb']) { + echo $art; + } + elseif (!img_resize($art,$size,$extension)) { + echo $art; + } + break; +} // end switch type ?> |