diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-11-04 23:12:31 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-11-04 23:12:31 +0000 |
commit | d3840c7de09f2b8d4e06ba91d94459d9baccee4e (patch) | |
tree | 62604e6d941ab38d69e5c6df9922eff8f45d6020 | |
parent | 5a76782bd3ccc4a76847b4581a71f53dcbcf4aa8 (diff) | |
download | ampache-d3840c7de09f2b8d4e06ba91d94459d9baccee4e.tar.gz ampache-d3840c7de09f2b8d4e06ba91d94459d9baccee4e.tar.bz2 ampache-d3840c7de09f2b8d4e06ba91d94459d9baccee4e.zip |
some slight tweaks to display on openstrands stuff, and fixed some potential errors due to bad returned data
-rw-r--r-- | lib/class/metadata.class.php | 6 | ||||
-rw-r--r-- | modules/infotools/openstrands.class.php | 6 | ||||
-rw-r--r-- | templates/show_artist_box.inc.php | 2 | ||||
-rw-r--r-- | themes/classic/templates/default.css | 3 |
4 files changed, 10 insertions, 7 deletions
diff --git a/lib/class/metadata.class.php b/lib/class/metadata.class.php index 4a90e59a..9e562090 100644 --- a/lib/class/metadata.class.php +++ b/lib/class/metadata.class.php @@ -48,7 +48,7 @@ class metadata { // For now it's only mystrands OpenStrands::set_auth_token(Config::get('mystrands_developer_key')); $openstrands = new OpenStrands($GLOBALS['user']->prefs['mystrands_user'],$GLOBALS['user']->prefs['mystrands_pass']); - + // Make sure auth worked if (!$openstrands) { return false; } @@ -60,6 +60,8 @@ class metadata { break; } + $objects = array(); + foreach ($results as $item) { switch ($type) { case 'artist': @@ -120,6 +122,8 @@ class metadata { $tracks = $openstrands->lookup_album_tracks($mystrands_id,Openstrands::$alias); + $object = array(); + // Recurse the data we've found and check the local album foreach ($tracks as $track) { if (!$album->has_track($track['TrackName'])) { diff --git a/modules/infotools/openstrands.class.php b/modules/infotools/openstrands.class.php index 1994c084..4410a279 100644 --- a/modules/infotools/openstrands.class.php +++ b/modules/infotools/openstrands.class.php @@ -461,11 +461,11 @@ class openStrands { $alias = $alias ? urlencode($alias) : urlencode(self::$alias);
$xml_doc = self::run_query("/recommend/artists?alias=$alias$id_string$name_string&num=$limit&skip=$offset$filters");
-
+
$this->_containerTag = 'SimpleArtist';
$data = $this->run_parse($xml_doc);
-
+
return $data;
} // recommend_artists
@@ -655,6 +655,8 @@ class openStrands { $data = $this->results;
$this->results = '';
+ if (!$data) { return array(); }
+
return $data;
} // run_parse
diff --git a/templates/show_artist_box.inc.php b/templates/show_artist_box.inc.php index 351ce072..6cd025f8 100644 --- a/templates/show_artist_box.inc.php +++ b/templates/show_artist_box.inc.php @@ -39,7 +39,7 @@ if (Config::get('ratings')) { <a href="<?php echo $web_path; ?>/artists.php?action=show_similar&artist=<?php echo $artist->id; ?>"><?php echo _("Find duplicate artists"); ?></a><br /> <?php } ?> <?php if (Plugin::is_installed('OpenStrands')) { ?> -<span class="text-action"><?php echo Ajax::text('?page=stats&action=show_recommend&type=artist&id=' . $artist->id,_('Recommend Similar'),'artist_recommend_similar'); ?></span> +<?php echo Ajax::text('?page=stats&action=show_recommend&type=artist&id=' . $artist->id,_('Recommend Similar'),'artist_recommend_similar'); ?> <?php } ?> </div> <?php show_box_bottom(); ?> diff --git a/themes/classic/templates/default.css b/themes/classic/templates/default.css index f826c8b1..5778cc49 100644 --- a/themes/classic/templates/default.css +++ b/themes/classic/templates/default.css @@ -707,9 +707,6 @@ td.user_disabled { }
#information_actions ul { list-style:none; }
#information_actions h3 { font-size:1.2em;margin:0.2em; }
-#additional_information {
- float:left;
-}
/************************************************/
|