You are here

function filefieldmp3player_preprocess_filefieldmp3player_description in MP3 Player 6

Same name and namespace in other branches
  1. 6.2 filefieldmp3player/filefieldmp3player.module \filefieldmp3player_preprocess_filefieldmp3player_description()

Pre-processor for mp3 player description.

File

filefieldmp3player/filefieldmp3player.module, line 97

Code

function filefieldmp3player_preprocess_filefieldmp3player_description(&$vars) {
  $vars['title'] = $vars['id3']['tags']['id3v2']['title'][0];
  $vars['artist'] = $vars['id3']['tags']['id3v2']['artist'][0];
  $vars['album'] = $vars['id3']['tags']['id3v2']['album'][0];
  $vars['year'] = $vars['id3']['tags']['id3v2']['year'][0];
  $vars['track'] = $vars['id3']['tags']['id3v2']['track'][0];
  $vars['genre'] = $vars['id3']['tags']['id3v2']['genre'][0];
}