Automatically Fetching Lyrics for iTunes
Saturday, October 25th, 2008Andrew, who is a friend of mine, found out that the iPod Touch / iPhone can display lyrics as you are playing songs. I had no clue that this was possible. Andrew spent hours upon hours looking for songs on Google and copying and pasting lyrics into iTunes. He didn’t even manage to get through a quarter of the songs on his library.
So I began to look and ask around on the internet and on the Mac Rumors forums (link to specific thread). I found a few applications, such as Evil Lyrics (Windows), GimmieSomeTune (Mac), and PearLyrics (Google for download; was removed from author’s page due to legal concerns) (Mac). However, none of these met my needs. There was still the issue of manually copying / pasting. With over a thousand songs (and I have a “small” amount, at 1,144 songs), the task of importing lyrics is still incredibly long and tedious.
Then I found iTunes Lyrics. It can automatically (or manually) import lyrics for songs that are selected in iTunes. It is fast and it is generally accurate. It pulls lyrics off of LyricWiki. It’s a simple application written in C# (hence it’s Windows only). The great part about it is that it’s on Google Code and it’s released under GPL Version 2. This means that anyone can go on Google Code, use subversion (a CVS-like repository), and receive all of the code for it. Code can be re-released by anyone, with a few stipulations (rights clearly noted, etc.).
I found a problem with iTunes Lyrics. When it couldn’t find a song, it would set the lyrics in the song to “Not found.” When it was an instrumental song, the lyrics would read “Insturmental only; no voice” or something of that nature. I don’t want anything to pop up on my iPhone when songs are played that don’t have lyrics. So I decided to use Subversion through Microsoft Visual Studio 2008 to grab the C# source for iTunes Lyrics.
I then read the code through and decided that I would add a simple clause to remedy this problem:
if (result.lyrics.Length <= 60)
{
result.lyrics = “”;
}
Basically, for those who have no experience in computers, this line says “If the length of the lyrics that were received from LyricWiki is less than 60 characters long, then it must be either “Not found” or some other message stating that there are no lyrics. So we will set the lyrics to be blank.” Setting the lyrics to be blank will stop the iPod Touch / iPhone from displaying lyrics for songs that do not have lyrics.
I then compiled and packaged it. Here is the link to the files. Just run “iTuneslyrics.exe.” I give full credit in the README.txt file to the author. I provide no warranty. If anyone tries it, please post a comment here telling me if it works or not. It might need the installer so that it can install the plugin into iTunes.
All I did after I modified the program was press Ctrl+A in my iTunes library to select all of my songs, then I checked the two boxes in iTunes Lyrics and I clicked the button. Now I have lyrics for all of my songs in a matter of minutes.














