In here, I'm planning on looking at an MP3 file, and pulling out its ID3 meta data. The MP3 I want to look at is the file I Feel Fantastic.mp3, intentionally given a file name that is common amongst music collections.

This should really be made into a unit test...

Here's a table listing the meta data I'd like to return (accurate) and what I'm actually able to return.

Tag nameExpected responseDynamic response
Title I Feel Fantastic I Feel Fantastic
Artist Jonathan Coulton Jonathan Coulton
Album Our Bodies, Ourselves, Our Cybernetic Arms Our Bodies, Ourselves, Our Cybernetic Arms
Track number 2 2/5
Length 03:03 (183 seconds) 183

For future reference, the ID3 analyze function returns something like this:

array(1) {
  ["id3v2"]=>
  array(8) {
    ["title"]=>
    array(1) {
      [0]=>
      string(16) "I Feel Fantastic"
    }
    ["artist"]=>
    array(1) {
      [0]=>
      string(16) "Jonathan Coulton"
    }
    ["composer"]=>
    array(1) {
      [0]=>
      string(16) "Jonathan Coulton"
    }
    ["album"]=>
    array(1) {
      [0]=>
      string(42) "Our Bodies, Ourselves, Our Cybernetic Arms"
    }
    ["year"]=>
    array(1) {
      [0]=>
      string(4) "2005"
    }
    ["encoded_by"]=>
    array(1) {
      [0]=>
      string(11) "iTunes v4.9"
    }
    ["comments"]=>
    array(2) {
      [0]=>
      string(89) "00001630 00000344 0000E27C 000031E5 00029FBC 0000B10A 000084B2 000085CC 00019582 00007524"
      [1]=>
      string(222) "From the soundtrack for the Future of the Body issue of Popular Science magazine, September 2005. Published under a Creative Commons license. More info and music at http://www.jonathancoulton.com. (c) 2005 Jonathan Coulton"
    }
    ["track_number"]=>
    array(1) {
      [0]=>
      string(3) "2/5"
    }
  }
}