diff --git a/views_bonus.module b/views_bonus.module
index 1bfc4146d262c56fcda26079f838ed238bde3956..64cf8b780f59b2fe8d7313de22f742a4174e0a98 100644
--- a/views_bonus.module
+++ b/views_bonus.module
@@ -732,18 +732,24 @@ function views_bonus_audio_playlist($view, $nodes, $type) {
$output .= " \n";
foreach ($nodes as $n) {
$node = node_load($n->nid);
- $output .= " \n";
+ $output .= theme('views_bonus_audio_track_xml', $node);
}
$output .= " \n";
- $output .= " \n";
+ $output .= "\n";
drupal_set_header('Content-Type: text/xml; charset=utf-8');
print $output;
exit;
}
+
+function theme_views_bonus_audio_track_xml($node) {
+ $output .= " \n";
+ $output .= " " . check_plain($node->title) . "\n";
+ $output .= " " . check_plain($node->audio_tags['title']) . "\n";
+ $output .= " " . check_plain($node->audio_tags['track']) . "\n";
+ $output .= " " . check_plain($node->audio_tags['album']) . "\n";
+ $output .= " " . check_url($node->url_play) . "\n";
+ $output .= " " . url("node/$node->nid", NULL, NULL, TRUE) . "\n";
+ $output .= " " . $node->nid . "\n";
+ $output .= " \n";
+ return $output;
+}