summaryrefslogtreecommitdiffstats
path: root/lib/class/metadata.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-08-07 04:06:25 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-08-07 04:06:25 +0000
commitde10ec0e5b0db49a0687995f27e05e9b593c12c2 (patch)
treed41bf660eda17bb5fd97668674ef18ec6c2ea61d /lib/class/metadata.class.php
parent849239662e53cd16c154bf592a2772fd56f6e3fd (diff)
downloadampache-de10ec0e5b0db49a0687995f27e05e9b593c12c2.tar.gz
ampache-de10ec0e5b0db49a0687995f27e05e9b593c12c2.tar.bz2
ampache-de10ec0e5b0db49a0687995f27e05e9b593c12c2.zip
tweaked algo for finding missing tracks, a good bit more reliable
Diffstat (limited to 'lib/class/metadata.class.php')
-rw-r--r--lib/class/metadata.class.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/class/metadata.class.php b/lib/class/metadata.class.php
index 8f5abf2b..f7cb3e32 100644
--- a/lib/class/metadata.class.php
+++ b/lib/class/metadata.class.php
@@ -94,6 +94,7 @@ class metadata {
// Build our object
$album = new Album($album_id);
+ $album->format();
$objects = array();
// For now it's only mystrands
@@ -102,8 +103,16 @@ class metadata {
if (!$openstrands) { return false; }
+ // Setup the string we're going to pass
+ if ($album->artist_count == '1') { $artist_name = $album->artist_name; }
+ else { $artist_name = "Various"; }
+
+ $data[] = array('artist'=>$artist_name,'album'=>$album->full_name);
+
// First find the album on mystrands
- $result = $openstrands->search_albums($album->full_name,'1');
+ $result = $openstrands->match_albums($data);
+
+ if (!$result) { return false; }
$mystrands_id = $result['0']['__attributes']['AlbumId'];