[WS] Discogs (pone mod)

Update 3.13
Finally it's done, took me some time.

NEW:
Extra fields for the original Discogs artist names.
These fields are there as additional fields for the already existing DISCOGS_ALBUMARTIST (Albumartist), DISCOGS_ARTIST (Artist) and DISCOGS_EXTRA ARTIST (Mixartist).

The names of the new fields are:
DISCOGS_ORIGINAL ALBUMARTIST NAME
DISCOGS_ORIGINAL ARTIST NAME
DISCOGS_ORIGINAL EXTRA ARTIST NAME

Additionall, there are extra fields for the scripts which can write tags from discogs master release pages:
DISCOGS_MASTER ORIGINAL ALBUMARTIST NAME
DISCOGS_MASTER ORIGINAL ARTIST NAME
(there are no extra artists on the master release pages)

And there are three new options, where you can choose how artist names are linked/seperated if there is more then one artist:
TEXT OPTION: MULTI DISCOGS ALBUMARTIST NAME: MULTIVALUE TAG (= YES)/SEPERATE BY: (WRITE CHARACTERS)
TEXT OPTION: MULTI DISCOGS ARTIST NAME: MULTIVALUE TAG (= YES)/SEPERATE BY: (WRITE CHARACTERS)
TEXT OPTION: MULTI DISCOGS EXTRA ARTIST NAME: MULTIVALUE TAG (= YES)/SEPERATE BY: (WRITE CHARACTERS)

You can write both, the new and the old fields, or you can also set the old fields to "no" and the new fields to "albumartist", "artist" & "mixartist" to have the old fields replaced by the new ones.
The concept of these new fields is the following:
There are many artist who use different spellings of their names. Like "R.E.M.", who are also using "REM" or "R. E. M."
Discogs has one main artist name for them ("R.E.M."), all other variations are called artist name variation at discogs and will appear with a star after the name on the discogs pages ("REM*", "R. E. M.*"). Simple spelling mistakes as they are often found at compilations are also treated as artist name variations at discogs.
Completly different pseudonyms are not treated as variations, these are listed under Aliases on the artist page, but are not linked in any way on the release pages.

Discogs always uses the artist name (variation) which is found on the physical release for their release pages. The main artist name is only "hidden" in the URL of the link to the artist page. These links are now read by my script with the new fields.
The only problem is these links are URL encoded. This means, all non standart latin characters (everything other than A-Z, a-z, 0-9) are replaced whith their utf-8 character code. So I had to put in a long list of replaces into the scipts, 921 replaces to be exact. This makes the script a bit slow if you use these new fields.

At the old standard fields for Albumartist, Artist and Mixartist, different artists are always linked in the way they are written on the discogs page. At the new field, you can choose this with the new options shown above
I have left the original discogs artist names untouched. That means, you chan't put the trailing ", The" to the front of the name and you can't delete the number in parentheses after the artist name. Maybe that comes in the next update, let me know if you want that.

I used this this list of characters for my replaces:
http://www.utf8-zeichentabelle.de/unicode-....pl?number=1024
Note that this is only the uncicode character set which is called "Basic Latin". There are about 200 more character sets, which cover everything from chinese and arabic characters to Braille and more or less common symbols. These can't be read by my script and you will get things like %C7%84, %DF%AB, instead.
I could give you instruction how to add further character sets to the script in a few steps if somebody needs/wants them. But this would make the script again more slowly. Let me know if you want to.

NEW:
OPTION: COMPILATION = 1 FOR MULTI-ARTIST-RELEASES
If you set this to "yes", the script will write the field COMPILATION with the value "1" for all releases with different artists. The field will be left empty for releases with only one artist.

CHANGED:
Mp3tag can't write the character "|" with web sources scripts because it has a special function. My script replaced it with "/" in the older version. From now on it will be replace with "ǀ", which is a different character but looks almost the same.

FIXED:
A week ago Discogs changed some details on the search pages which lead to a permanent fail of all search scripts. Now they work again.

FIXED:
DISCOGS_RELEASETYPE has had left some html code in the output if you haven't used DISCOGS_MEDIATYPE at the same time. This is fixed now.

FIXED:
OPTION: ALBUMARTIST FOR SINGLE-ARTIST-RELEASES did not work if you tagged your music directly from a master release page. Albumartist was always written. This is fixed now.

FIXED:
Setting DISCOGS_ARTIST to "no" led to a mistake at the output of DISCOGS_TITLE. This is fixed now.

EDIT:
Discogs has anounced that they shut down their old API on December 15. This will only affect the "API-List Artist" script. I guess it will stop working on December 15 and I will have to do another update. The "API-List Artist" won't have all releases of an artist in it after that. Different Versions of a release will be grouped under the main release, which means that the script won't be able tag your script from all versions.
More about that here: Changes at discogs.com
But we will see, stay tuned.