Index: audio.theme
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/audio/audio.theme,v
retrieving revision 1.4
diff -u -r1.4 audio.theme
--- audio.theme	6 Apr 2006 04:17:12 -0000	1.4
+++ audio.theme	27 Apr 2006 18:33:11 -0000
@@ -50,7 +50,7 @@
 
   foreach (audio_get_tag_settings() as $tag => $setting) {
     if (!$setting['hidden'] && $node->audio_tags[$tag]) {
-      $output .= '<li><b>'. t(ucwords(str_replace('_', ' ', $tag))). ':</b> '. theme('audio_format_tag', $tag, $node->audio_tags[$tag]) ."</li>\n";
+      $output .= '<li><b>'. t(ucwords(str_replace('_', ' ', $tag))). ':</b> '. theme('audio_format_tag', $tag, $node->audio_tags[$tag], $setting) ."</li>\n";
     }
   }
   $output .= '<li><b>'. t('Length') .':</b> '. theme('audio_format_filelength', $node->audio_fileinfo)  ."</li>\n";
@@ -63,24 +63,22 @@
 /**
  * Format a ID3 tag.
  */
-function theme_audio_format_tag($tag, $value) {
-  switch ($tag) {
-    // un-linked tags
-    case 'comment':
-    case 'track':
-    case 'tracknum':
-    case 'totaltracks':
-      return check_plain($value);
-
-    // url tags
-    case 'url_file':
-    case 'url_artist':
-    case 'url_source':
-    case 'url_station':
-      return '<a href="'. check_url($value) .'" title="'. $tag .'">'. check_plain($value) .'</a>';
+function theme_audio_format_tag($tag, $value, $setting) {
+  if ($setting['browsable']) {
+    return l($value, "audio/by/$tag/". audio_clean_tag($value));
+  }
+  else {
+    switch ($tag) {
+      // url tags
+      case 'url_file':
+      case 'url_artist':
+      case 'url_source':
+      case 'url_station':
+        return '<a href="'. check_url($value) .'" title="'. $tag .'">'. check_plain($value) .'</a>';
 
-    default:
-      return l($value, "audio/by/$tag/" . audio_clean_tag($value));
+      default:
+        return check_plain($value);
+    }
   }
 }
 

