summaryrefslogtreecommitdiffstats
path: root/albums.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-07-29 05:34:21 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-07-29 05:34:21 +0000
commited04606a52c31c951c766aca152ca91c138fbbf1 (patch)
tree0c427e3901d50e5cdba6ec013d942615af6b62ee /albums.php
parent258e4fcdf22745ce2b119df63458790461a6fbf0 (diff)
downloadampache-ed04606a52c31c951c766aca152ca91c138fbbf1.tar.gz
ampache-ed04606a52c31c951c766aca152ca91c138fbbf1.tar.bz2
ampache-ed04606a52c31c951c766aca152ca91c138fbbf1.zip
slightly improved the logic on pulling albums, fixed a typo causing find album art not to work as advertised
Diffstat (limited to 'albums.php')
-rw-r--r--albums.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/albums.php b/albums.php
index 9e6a7a37..9c97163b 100644
--- a/albums.php
+++ b/albums.php
@@ -64,6 +64,7 @@ switch ($_REQUEST['action']) {
// get the Album information
$album = new Album($_REQUEST['album_id']);
+ $album->format();
$images = array();
$cover_url = array();
@@ -88,7 +89,7 @@ switch ($_REQUEST['action']) {
$artist = scrub_in($_REQUEST['artist_name']);
}
elseif ($album->artist_count == '1') {
- $artist = $album->artist;
+ $artist = $album->artist_name;
}
if (isset($_REQUEST['album_name'])) {
$album_name = scrub_in($_REQUEST['album_name']);
@@ -100,7 +101,7 @@ switch ($_REQUEST['action']) {
$options['artist'] = $artist;
$options['album_name'] = $album_name;
$options['keyword'] = $artist . " " . $album_name;
-
+
// Attempt to find the art.
$images = $album->find_art($options,'6');
@@ -115,7 +116,7 @@ switch ($_REQUEST['action']) {
if (count($images)) {
// We don't want to store raw's in here so we need to strip them out into a seperate array
foreach ($images as $index=>$image) {
- if (isset($image['raw'])) {
+ if (isset($image[$index]['raw'])) {
unset($images[$index]['raw']);
}
} // end foreach
@@ -133,8 +134,8 @@ switch ($_REQUEST['action']) {
$artistname = $artist;
// Remember the last typed entry, if there was one
- if (isset($_REQUEST['album_name'])) { $albumname = scrub_in($_REQUEST['album_name']); }
- if (isset($_REQUEST['artist_name'])) { $artistname = scrub_in($_REQUEST['artist_name']); }
+ if (!empty($_REQUEST['album_name'])) { $albumname = scrub_in($_REQUEST['album_name']); }
+ if (!empty($_REQUEST['artist_name'])) { $artistname = scrub_in($_REQUEST['artist_name']); }
require_once Config::get('prefix') . '/templates/show_get_albumart.inc.php';