[WS] MusicBrainz XML Webservice

Mp3tag 2.40 or higher required

How do I install the script? / Wie installiere ich das Script?

MusicBrainz Web Service

  • MusicBrainz Web Service#Search by Artist Search by: Artist Imports: Artist, Album, Titles, Year, ASIN, Cover
  • MusicBrainz Web Service#Search by Artist + Title Search by: Artist + Title Imports: Album, Year
  • MusicBrainz Web Service#Search by Artist + Title (Orig Tags) Search by: Artist + Title Imports: Origalbum, Origyear

MusicBrainz Web Service ID (+ ID Tags)
Imports: Artist, Album, Titles, Year, ASIN, Cover + several MusicBrainz ID Tags

  • Search by: Album
  • Search by: Album + Artist
  • Search by: Album + Total Tracks
  • Search by: Artist

MusicBrainz Artist Info
Imports: Artist, Artistsort, Artist Country, Artist Id, www

  • Search by: Artist

MusicBrainz_v2_04.zip (5.27 KB)

MusicBrainz_v2_direct_id_.zip (2.18 KB)

3 Likes

hi dano

your MusicBrainzXML-script is working fine. I only had some issues if it finds albums which doesn't contian the "type" of the release, so i modified it a little bit. :slight_smile:

38    # Type
39    if "\" type=\""
40        findinline "type=\""
41        sayuntil "\""
42    else
43        say "unknown"
44    endif
45    say "|"

Best regards
Tommy

I've fixed that some time ago but forgot to update here..

hi again dano

thanx for your update :wink:

i am trying to write a web source for MusicBrainz XML lookup based on your album lookup, but i don't get it to work.
i get an error that there is no connection to the url musicbrainz.org.
don't know how i have to skip the search part and only run the album part of the script

i hope you can help me

regards
tommy

BTW: i modified your MB-non-XML web source to lookup with the id which works fine.

MusicBrainz_XML_id.zip (947 Bytes)

You must have the complete url in [IndexUrl]

 [IndexUrl]=http://musicbrainz.org/ws/1/release/%s?type=xml&inc=tracks+artist+release-events
[AlbumUrl]=
[WordSeperator]=
[IndexFormat]=%_url%|%Album%|%Artist%|%Year%
[SearchBy]=%comment%
[Encoding]=utf-8

[ParserScriptIndex]=...
# ###################################################################
#                    I  N  D  E  X
# ###################################################################
#debug "on" "c:\\\\debug_MusicBrainz-XML_A.html" "5"

sayoutput "CurrentUrl"
say "|"
say "|"
say "|"
saynewline

Thanks dano

it works fine :wink:
But there yet another problem to lookup the following disc with the xml script:

only 15 tracks are read and there is an error for the artist column.

regards
Tommy

The xml file does not have an artist for every track.
It leaves out the artist when the track artist is the same as the main artist (here it is Paul McCartney)
I can only make it skip the empty artists (update in first post)

I also made a new topic...

Thanks dano for this alternate websource. I knew that would be the better way to access musicbrainz, but never got around to writing a parser. For those of you who still use the old musicbrainz websource (that grabs the album art), here's an updated version that fixes a small bug where it wouldn't find tracks that were flagged for revision. Let me know if there are any more bugs.

-will

Added.

Very cool script. Thanks dano. :slight_smile:

Is it just me or is this script not working anymore?

For example, the Album "Neon Bible" (Arcade Fire) can't be found even though musicbrainz.org lists it (http://musicbrainz.org/release/b326d239-245a-49b5-b5e1-2adb94df7740.html). Same thing with many other albums. Can't find a working one just now..

Regards
PhenX

One char :rolleyes: .. get update.

Thank you very much :smiley:

Any idea why the character encoding sometimes doesn't work as it should when fetching data with this script? It seems to be totally random if the encoding works or if the special characters are messed up. So far I've been able to get correct data by trying a few times, but I wonder if the problem is in the script or at MB's end.

But thanks for the excellent script, made me a devoted MusicBrainz user.

This problem has occured before but nobody could find the reason.
The script cannot influence this, it could be Musicbraniz server or Mp3tag. It happens not very often, it's hard to find the problem.
Maybe you can give a few search terms that caused the problem.

Added length display and ASIN Tag and a script that also adds MusicBrainz ID Tags!

For those of you who want to search by more than album title (for those releases that have very common names, like "Greatest Hits"), here are two more MusicBrainz Web Service web sources. In one, you can search by artist (lists all albums by that artist), and the other, you can search by the unique MB Disc ID that's usually at the bottom of that album's page. You need to find the album on MusicBrainz's site first, then copy that Disc ID string (which looks something like "0iGW9Brqglc3pz77ugFj5a6YW6I-"), and paste it into the Mp3tag web sources search dialog.

If you want to modify this script to search for other parameters, go to http://musicbrainz.org/doc/XMLWebService and scroll down to the "release resources" section. Copy which parameter you want to use, then open up the .src file you want to modify, and the only part you need to change is the "[IndexUrl]" line, at the end, immediately before the "=%s" part. Change that to whatever you want to search for. For example, when searching by album name, the line used to be:
[IndexUrl]=http://musicbrainz.org/ws/1/release/?type=xml&limit=20&title=%s

To search by Disc ID, I changed it (including increasing the # of matches returned to 100) to:
[IndexUrl]=http://musicbrainz.org/ws/1/release/?type=xml&limit=100&discid=%s

I didn't include the extra IDs that dano extracts with the "+ID Tags" script. This just grabs the same basic info as the Web Service Search by Album script.

Thanks again to dano and Florian for such an excellent program. v2.40 is a fantastic improvement, especially for the web sources UI. Great work!

-Will

MusicBrainz_Search_by_Artist_or_Disc_ID.zip (2.67 KB)

umm odd question, but is there any way to get the MB websource to show times in minutes and seconds? It looks like it is doing it in seconds, but it is hard to cross reference the track to the db when they are in different units of measure.

I really don't know how to do this myself, that's why I am asking.

Regards,
G

You must have the latest Mp3tag version then it shows minutes and seconds.

Thanks Dano,

I am running 2.39

I'll update.

You rock brother,
G

I´m not a programmer, so i have some problems to change the scripts. What i want to do is have a search by artist and title, which shows only official albums with ( or sorted by ) year.

In many cases i have a tag with Greatest hits or something else and want to change it to the origin album.

Can someone help me please?

Thanks in advance!