carballude/GoogleMusicDownloader — pull request #1 by alexmcchesney (2011-11-11 19:47:19+00:00)
Title: Some GoogleMusicDownloader updates

Hi Pablo. I've made few little changes to the GoogleMusicDownloader that you might want to know about.

1. After closing the download window, the process wasn't ending, and had to be killed from task manager. This was caused by the hidden browser window staying alive.

2. Invalid characters are now removed from filenames, and if a file already exists in the download location, the target has (n) appended to it, where n is an integer ensuring uniqueness. (eg MyBand - My Song (1).mp3)

3. Downloaded songs now have the ID3 tags for Name, Artist and Album set after download. This uses [UltraID3Lib] to actually write the tags, and I've added this to the project.

UltraID3 lib is a closed-source project, though it is free to use providing you credit the author. I don't know how you feel about this, and if you'd rather the project remained totally open-source, then that's fair enough. If you do decide to roll it into the main fork, we should probably add a credit as per the license file.

To explain why the ID3 tags are so useful to me - I recently lost a large MP3 collection to a hard-drive crash. Fortunately, most of it was "backed up" to Google Music, though I was frustrated to find that they don't currently allow you to re-download stuff you have stored there. Your downloader tool was proving useful, but I keep my music in iTunes, and without ID3 tags it files everything under "unknown artist" and "unknown album", with the name of the song lifted directly from the file name. I was able to use [MusicBrainz Picard] to update ID3 information, which did a reasonably good job under the circumstances, but was still quite error prone, since it had to "guess" the album from the filename/length etc.

Having ID3 tags in place makes rebuilding my library a lot easier. Unfortunately, Google Music doesn't display the track number in the playlist view, so I still have to put them through Picard before importing into iTunes, or it'll get the track order wrong. But Picard makes a much better job of it now that it can read the name of the source album from the tags.

Anyway, let me know what you think of the changes, and thanks again for developing the tool. Hope things are going well for you. I'll be keeping an eye on your blog for more interesting projects. ;)

Alex

[UltraID3Lib]: http://home.fuse.net/honnert/UltraID3Lib/
[MusicBrainz Picard]: http://musicbrainz.org/doc/MusicBrainz_Picard