diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/class/album.class.php | 2 | ||||
-rw-r--r-- | lib/class/catalog.class.php | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/class/album.class.php b/lib/class/album.class.php index fc54f390..bc383f7c 100644 --- a/lib/class/album.class.php +++ b/lib/class/album.class.php @@ -300,6 +300,7 @@ class Album { $coverart = $raw_data['coverart']; ksort($coverart); + foreach ($coverart as $key=>$value) { $i++; $url = $coverart[$key]; @@ -310,7 +311,6 @@ class Album { } // end foreach return $data; - } // get_lastfm_art /*! diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php index 1e58642e..81bf8873 100644 --- a/lib/class/catalog.class.php +++ b/lib/class/catalog.class.php @@ -515,11 +515,16 @@ class Catalog { // Return results $results = $album->find_art($options,1); - + if (count($results)) { // Pull the string representation from the source $image = get_image_from_source($results['0']); - $album->insert_art($image,$results['0']['mime']); + if (strlen($image) > '5') { + $album->insert_art($image,$results['0']['mime']); + } + else { + debug_event('album_art','Image less then 5 chars, not inserting','3'); + } $art_found++; } |