? .svn
? audio-player.zip
? mp3player
? filefieldmp3player/.svn
? filefieldmp3player/theme/.svn
Index: filefieldmp3player/filefieldmp3player.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mp3player/filefieldmp3player/filefieldmp3player.module,v
retrieving revision 1.1.2.10
diff -u -p -r1.1.2.10 filefieldmp3player.module
--- filefieldmp3player/filefieldmp3player.module	19 Jul 2009 16:24:04 -0000	1.1.2.10
+++ filefieldmp3player/filefieldmp3player.module	30 Apr 2010 22:02:13 -0000
@@ -36,12 +36,7 @@ function filefieldmp3player_theme() {
   $theme['filefieldmp3player_description'] = array(
     'template' => 'description',
     'arguments' => array(
-      'title' => NULL,
-      'artist' => NULL,
-      'album' => NULL,
-      'year' => NULL,
-      'track' => NULL,
-      'genre' => NULL,
+      'info' => array(),
     ),
     'path' => $path,
     );
@@ -61,15 +56,7 @@ function theme_filefieldmp3player_format
   
   if(variable_get('mp3player_description', 'description') == 'id3' && module_exists(getid3) && getid3_load() == TRUE) {
     $info = getid3_analyze($item['filepath']);
-
-    $title = $info['tags']['id3v2']['title'][0];
-    $artist = $info['tags']['id3v2']['artist'][0];
-    $album = $info['tags']['id3v2']['album'][0];
-    $year = $info['tags']['id3v2']['year'][0];
-    $track = $info['tags']['id3v2']['track'][0];
-    $genre = $info['tags']['id3v2']['genre'][0];
-    
-    $description = theme('filefieldmp3player_description', $title, $artist, $album, $year, $track, $genre);
+    $description = theme('filefieldmp3player_description', $info);
   }
   else if(isset($item['data']['description']) && is_array($item['data'])) {
     //Data straight from node isn't serialized
@@ -95,4 +82,10 @@ function theme_filefieldmp3player_format
       return theme('filefield_formatter_default', $element);
     }
   }
-}
\ No newline at end of file
+}
+
+function filefieldmp3player_preprocess_filefieldmp3player_description(&$vars) { 
+  $title = $vars['info']['tags']['id3v2']['title'][0];
+  $artist = $vars['info']['tags']['id3v2']['artist'][0];
+  $vars['description'] = $title .' '. t('by') .' '. $artist;
+}
Index: filefieldmp3player/theme/description.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mp3player/filefieldmp3player/theme/Attic/description.tpl.php,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 description.tpl.php
--- filefieldmp3player/theme/description.tpl.php	19 Jul 2009 16:24:04 -0000	1.1.2.1
+++ filefieldmp3player/theme/description.tpl.php	30 Apr 2010 22:02:13 -0000
@@ -6,12 +6,7 @@
  * This template outputs the description field.
  *
  * Variables:
- * - $title
- * - $artist
- * - $album
- * - $year
- * - $track
- * - $genre
+ * - $info
  */
 ?>
-<?php print $title .' '. t('by') .' '. $artist; ?>
\ No newline at end of file
+<?php print $description; ?>
