This script adds a new web tagger source to Auto-Tag from Web that uses MusicBrainz.org. When run, the script first attempts to get the PUID from MusicIP to identify the first selected track. If it finds the PUID, it then gets a list of all tracks from MusicBrainz.org that match that PUID. If it can't find a PUID, it will then do a manual search on MusicBrainz. Once the results are found on MusicBrainz, they are presented to the user. The window works as expected from here. One key add, I've included a drop-down for selecting which "seed song" to use. Initially this is the first song in the selected song list. You can change to a different song though if this one doesn't give good results.

Features:-Uses MusicIP to lookup the song by "fingerprint" the song if possible (look for the MusicIP logo in the resulting window - this indicates the search was able to use the PUID from MusicIP-Searches on Musicbrainz.org based on your manual search terms if you put any in, if you don't put any manual search terms in, it tries the MusicIP fingerprint, and finally if not found it does a search on artist and title.-Returns all the albums in MusicBrainz.org that match the search-Allows you to change the "seed song" that is used for the look-up (this also allows you to select a group of un-related songs and search without having to close Auto-tag window, select new songs, and re-open)-Hyperlink available off the AlbumArtist, Album Title or Label takes you to MusicBrainz page on each-Parses xml for Involved People, Composer and Lyricist for each track and shows those if present. Allows you to save to the Involved People tag-Provides misc links to other sites (Amazon, Discogs, Wikipedia, etc.) if present in MusicBrainz results-Shows album art from Amazon if the Amazon ASIN is included in the MusicBrainz results.

To use:-Download the mmip installer from the link below and run it-Find the new functionality from the Options button in the Auto-Tag from Web... window

Thanks go to: Trixmoto - I "borrowed" some of the PUID look-up code from his MusicIP Tagger script. macrbest for his script Discogs Auto-tagWebSearch. I used it as a basis for my html and scripting.

Version 2.0 March 29, 2009 Installer for v 2.0- Added a settings dialog box to configure various options. Button is on the top right corner (see screen shot below)- Fixed the previous artificial limit on numnber of albums to return. Now you can define exactly how many albums to list in the results. Note that MusicBrainz returns results in groups of no more than 100, so entering more than 100 will add to the time to process. In my testing, it's not noticeable, but on a slow computer or internet connection it may be noticable. Default is 100, change it in the settings dialog if you wish.- Added ability to lime the albums returned based on the result 'score' for each search. MusicBrainz scores the search results on a scale of 0 to 100. Setting this to 100 will return only exact matches. Setting to 0 will return everything no matter how loosely it matches the search. Default is 0- Added option to show the results in the search results drop down in Alphabetical order or descending order by the score for the album.- Added an option to have the score display in the search results drop down.- Added ability to have the Album Title tagged into the Album Title tag, Original Album Title tag or both.- Added ability to have the Artist tagged into the Artist tag, Original Artist tag or both.- Added ability to have the Year tagged into the Year tag, Original Year tag or both.- For the Year tag, it will now tag the full date if MusicBrainz has it, otherwise it will tag just the year- Added ability to have the Lyricist tagged into the Lyricist tag, Original Lyricist tag or both.- Added ability to have the release type tagged into one of the Custom fields, Grouping, ISRC, or Comments. See http://musicbrainz.org/doc/ReleaseAttribute for details on the release type. Note that ability to save into Custom 4 or 5 was introduced in MM beta version 3.1.0.1228. If you have a previous version, you won't have these as options.- Added ability to have the Country tagged into one of the Custom fields, Grouping, ISRC, Comments or Publisher field. If you choose the Publisher field and you also tag the Publisher, it is entered in parentheses after the Publisher. The default if you don't change it is Publisher.- Added option to always replace existing tags. When checked, it will delete any existing info already in the tag(s) even if the results for any tag(s) didn't find any data. If not checked and a tag has no results, existing info in the tag is preserved.- Added checkbox to "Troubleshooting - Show XML". If checked, this will open each XML page in your external browser as they are found. Normally you will not check this unless you're interested in the underlying XML code for some reason. I use this for troubleshooting. Default is not checked.- Added button to "Show Now" - this will open the XML page for the last search result in your external browser. Again - use this for troubleshooting only.- Added logging throughout the script. You can turn logging on or off, view the log file or delete the log file.- Adding logic to parse the Genres returned to identify which are already in your database and which would be new. Most of the code for this was by <b>SatinKnights</b>. You now have two check boxes for Genre - one for existing and one for New. Below these, each genre returned from the search will have its own checkbox so you can choose individual genres, all or none as you wish. Existing genres are capitalized as they are already in your database. New genres are given initial letter capitalization. In the display, the new genres are italicized to differentiate them from the existing ones.- Added ability to tag the track # independently of the Track title- Added timer into the MusicIP code so that it doesn't hang up indefinitely. If it doesn't find a PUID within 30 seconds, it will assume there isn't one and go on with the other searches.- Added a timer to display the search window immediately on launch of Web Tagger. Previously, it would wait for the MusicIP results before even appearing, which made it seem to not be doing anything.- Miscellaneous other minor tweaks to code and underlying html.

Version 1.5 March 8, 2009 Installer removed - use v 1.51- Fixed code for handling album art if the check box isn't checked (thanks flashk!)- Fixed code for MusicIP lookup that sometimes would hang if it couldn't lookup the song- Added date(s) to the results drop-down at the top- Set the results drop-down to sort the results in the drop-down- Modified the underlying html code to change the display a bit- Cleaned up and sorted the links that may appear after the track list to remove duplicates- Fixed (I hope) the indexOutOfBounds error that a few users experienced- Changed the search order. It tries these in order till it finds results:

-User entered search terms-MusicIP lookup-Album Name and Album Artist-Album Name and Track Artist-Track Title and Track Artist-Track Title and Album Artist-Artist-Album Artist-Album Name-Track Title

Version 1.4 February 8, 2009 Installer for v 1.4- Cleaned up search functionality if it didn't find the song on the first try. New method does search in this order:

-The search term manually entered by the user if any-MusicIP lookup to get the PUID and see if MusicBrainz knows about it-Search on the seed song's Title and Artist-Search on the seed song's Title and Album Artist-Search on the seed song's Album Name and Artist-Search on the seed song's Album Name and Album Artist-Search on the seed song's Artist-Search on the seed song's Album Artist-Search on the seed song's Album Name-Search on the seed song's Title

-Added code to display search progress-Cleaned up code that adds the songs to the song selector drop down-Fixed processing for which tags get updated and which fields are highlighted in yellow

Version 1.2 November 26, 2008 Installer for v 1.2-Fixed typo in code for handling the check box for saving the Lyricist-Cleaned up search functionality if it didn't find the song on the first try. New method does search in this order:

-The search term manually entered by the user if any-MusicIP lookup to get the PUID and see if MusicBrainz knows about it-Search on the seed song's Title and Artist-Search on the seed song's Artist and Album Name-Search on the seed song's Artist-Search on the seed song's Album Name

Version 1.1 November 23, 2008 Installer for v 1.1- Fixed code for handling if no song is found (it shouldn't just leave you with a blank screen now)- Added ability to tag Composer- Added ability to tag Lyricist- Added ability to choose which Label to tag if MusicBrainz has multipe (previous version defaulted to last label that MusicBrainz found)- Added additional links to other sites included in MusicBrainz's record- Added if it finds multiple albums, it selects the first one that matches the current album name (previously it just selected the first album returned, even if there was another returned that matched the album name)

Version 1.02 November 16, 2008 Installer for v 1.02- Fixed code for the reset button- Fixed code that checks for user manual search and uses that rather than trying MusicIP- Un-commented "On Error Resume Next" statements I'd left in for troubleshooting

Hope you all like it. I fixed a couple of minor issues - new release available.

Version 1.02 November 16, 2008 Installer for v 1.02- Fixed code for the reset button- Fixed code that checks for user manual search and uses that rather than trying MusicIP- Un-commented "On Error Resume Next" statements I'd left in for troubleshooting

I loaded up my MM3 and tried to use the hotkeys to auto-tag a song I just got and nothing would happen. Even tried right-clicking and 'auto-tag from web' and still nothing would happen.

I went round and round, even re-installing MM3 and still had the problem. Finally, went to a previously tagged song and tried the hotkeys and the window would open but nothing would be displayed. Further investigation revealed that I had MusicBrainz selected in the options instead of Amazon ... after selecting Amazon, everything worked normally.

Vyper wrote:Had a major problem with this script tonight and I don't know why.

It might be that MusicBrainz couldn't find the song. The latest release doesn't handle that as gracefully as I'd like. I've got a version I'm working with now that appears to fix that issue. I'll upload tomorrow or Saturday after I do some more testing.

Version 1.1 November 23, 2008 Installer for v 1.1- Fixed code for handling if no song is found (it shouldn't just leave you with a blank screen now)- Added ability to tag Composer- Added ability to tag Lyricist- Added ability to choose which Label to tag if MusicBrainz has multipe (previous version defaulted to last label that MusicBrainz found)- Added additional links to other sites included in MusicBrainz's record- Added if it finds multiple albums, it selects the first one that matches the current album name (previously it just selected the first album returned, even if there was another returned that matched the album name)

Version 1.2 November 26, 2008 Installer for v 1.2-Fixed typo in code for handling the check box for saving the Lyricist-Cleaned up search functionality if it didn't find the song on the first try. New method does search in this order:

-The search term manually entered by the user if any-MusicIP lookup to get the PUID and see if MusicBrainz knows about it-Search on the seed song's Title and Artist-Search on the seed song's Artist and Album Name-Search on the seed song's Artist-Search on the seed song's Album Name

Avoid "Product installation error"- Vista Users:- - To be able to install scripts you must Run MM as an administrator.- - It means that you must right click the MM icon and select "Run as administrator" even if you are logged in as an administrator.- All Users:- - Check in your task manager that you only have one instance of MediaMonkey.exe running.