Nothing annoys me more than Microsoft constantly failing to implement things according to standards. Microsoft’s biggest example, and everyone’s favorite example to mention, is Internet Explorer. Internet Explorer, despite being around longer than most, if not all, of the other popular browsers, has web standards implemented so poorly that most web developers are very familiar with the dreaded if IE tags. In one of my latest projects, I’ve found that another of Microsoft’s products is guilty of this as well: Windows Media Player 11.
I’ve been looking into playlist standards to implement in a project I’m working on that involves extracting song and artist information from user submitted playlists. One of the most popular formats around is m3u. m3u is a nice format because the song title and artist are stored in the playlist information, making the task of parsing out song and artist information simple. I’ll explain the standard format below using a sample playlist created in Winamp.
#EXTM3U #EXTINF:309,Blue Oyster Cult - (Don't Fear) The Reaper 06 - (Don't Fear) The Reaper.mp3
This is a sample playlist consisting of a single song from Blue Oyster Cult’s Greatest Hits CD generated in Winamp. The file is nearly self explanatory to anyone with programming experience, but I’ll explain it anyways.
#EXTM3U is a format descriptor letting any program attempting to read the file know that we are trying to use the extended m3u format.
The next line begins with #EXTINF: which lets the program know that we are reading a new record. Following the colon is a number, the length of the track in seconds. After the length of the track, the standard calls for the title of the song, preferably from the file’s ID3 tags. If the file doesn’t have that information available in ID3 tags, it can then chop off the extension off the file name and use as the title information.
The line following is a absolute or relative path to the music file. In this case, the music file exists in the same path as the playlist, so we have a relative path to it.
From the differences in the information line and the path line, one can easily see that WinAMP has pulled song title information from ID3 tags embedded in the file.
If there are more songs, a new record is simply added until the playlist is complete.
See? This format is easy to use and implement. If song information is available, the m3u format, when done correctly, makes the task of retrieving that information a form of child’s play. Unfortunately, Windows Media Player 11 doesn’t implement the format correctly. When checking out Window Media Player’s m3u format, I was horrified to find that the developers of that fine media player take the lazy way out and fail to do some trivial things that makes that information easy to get to.
To demonstrate, I created the same playlist in Windows Media Player 11 and saved it as an m3u file in the same folder as the music. Windows Media Player generated the following playlist:
#EXTM3U
#EXTINF:0,06 - (Don't Fear) The Reaper.mp3 06 - (Don't Fear) The Reaper.mp3
Let me be the first to say that this playlist does work. It’s perfectly fine. The part of this that annoys me is that Windows Media Player doesn’t even try to create the playlist like the standard suggests. Windows Media Player takes the “easy” way out, and, as a developer who wants to use a playlist to generate content, this annoys me to no end.
First of all, notice in the playlist generated by Winamp that the song lasts for 309 seconds. Windows Media Player doesn’t even try to calculate the length of the song and, without a second thought, dubs the length of the song to be 0 seconds. I’m okay with that though. The length of the song wasn’t important for what I wanted to do.
The part of this that really grinds my gears is that Windows Media Player doesn’t even try to add the ID3 information to the playlist like suggested. I know that information is there, but Windows Media Player just ignores it. The program simply repeats the file name, and that “feature” annoys me. What was so hard about writing the code to concatenate in information that I KNOW Windows Media Player has readily available into a text document? I learned how to concatenate strings in Computer Science 1, so I’m guessing that it wasn’t incredibly difficult to implement since the tag information is already loaded into memory. The developers were just too lazy to add that, and that oversight (or whatever it was) is now my problem. Wonderful.
That’s one major media player that I know won’t produce a standardized playlist like others, so I’ll have to take special consideration for that. Thank you, developers, for giving me one more problem to solve.
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment