[WS] Discogs (pone mod)

Update 3.12
a new gimmick at date and some bug fixes

NEW:
You can now choose the format of DISCOGS_DATE (date) more freely with the new option TEXT OPTION: DATE FORMAT (DD/D = day, MM/M/MON/MONTH = month, YYYY/YY is year)
You can define the format of the date with the following variables:
D = the day (1 for 1, 10 for 10)
DD = the day with leading zeros (01 for 1, 10 for 10)

M = the month in numbers (1 for January, 10 for October)
MM = the month in numbers with leading zeros (01 for January, 10 for October)
MON = the month in abbreviated like you see it at the discogs pages (Jan, Feb, Mar, ...)
MONTH = the month fully written (January, February, March, ...)

YY = only the last two digits of the year (99 for 1999, 00 for 2000, 01 for 2001, ...)
YYYY = the year (1999, 2000, 2001, ....)

You can separate these variables with every character except the following:
D M O N T H Y Ä Ö Ü \ " ( ) [ ]
You can use separators before and after every variable.
You can use only one variable for day, month and year.

If day or month is missing at discogs, it is replaced with 00 or 0. This can be avoided by using [...] or (...) which have a special function:
[...] What is enclosed in brackets is only written if a release month is given at discogs.
(...) What is enclosed in parenthesis is only written if a release day is given at discogs.
Remember that the date is only written if a release year is given at discogs. And there are no discogs pages with release day but without release month.
[...] can enclose (...), but not the other way around.

Some examples, valid date formats:
YYYY-MM-DD > 2011-01-05
D.M.YYYY > 5.1.2011
DD/MM/YY > 05/01/11
-DD-MM-YYYY- > -05-01-2011-
MMDD > 0105
Mon YYYY > Jan 2011
YYYY[-MM(-DD)] > 2011-01-05 (2011-01 if day is missing, 2011 if month is missing)
(D.)[M.]YYYY > 5.1.2011 (1.2011 if day is missing, 2011 if month is missing)

not valid:
DD\MM
MM DDth
MMDD Month
"DD MM"
YYYY([-MM]-DD)
(D.[)M.]YYYY

The old option OPTION: DATE YYYY-MM-DD (YES) OR DD.MM.YYYY (NO) will be deleted when you update the setting file, but your settings will be preserved in the new option.

NEW:
You often find "-" at discogs as track index to signify that the track index of the tracks before is not valid for the following tracks. In this cases "-" is no longer written to DISCOGS_TRACK INDEX (chapter) by the script.
Also simple track indexes which signify only the discnumber and the total length of the disc, like "CD1", "Disc 2", "CD 1 (63:49)" are no longer written to DISCOGS_TRACK INDEX.
Examples: "-" as track index: http://www.discogs.com/release/68272 discnumber + total length as track index: http://www.discogs.com/release/3210119

NEW/FIXED:
The "tracklist for album with multi song tracks" script overwrites the DISCOGS_EXTRA ARTIST (mixartist) with a single space if there is no extra artist. I included this for a better workflow. You can tag such albums now with a standard script (just to get the discogs-id) and re-tag it right afterwards with the multi-song-tracks script. I thought I had included this before, but either I deleted this at one of the last updates, or I never built this in.

FIXED:
Releases with only one track produced an error if you use DISCOGS~TRACK NUMBER WITH LEADING ZEROS, DISCOGS~TRACK NUMBER WITH LEADING ZEROS / TOTALTRACKS or DISCOGS~TRACK NUMBER / TOTALTRACKS. This is fixed now.

FIXED:
The DISCOGS~TRACK NUMBER / TOTALTRACKS field was not correctly overwritten by the four DISCOGS~TRACK_ONLY FOR... fields. This is fixed now.

FIXED:
The API-List Master Release Page Script had a little bug concerning the Master Release ID.
When you had set the option OPTION: WRITE DISCOGS_MASTER RELEASE ID WHEN TAGGING FROM NORMAL RELEASE PAGES to "no", it wrote the tag field never the less.
If you had set it "yes" it repeated the number, e.g. it wrote 1234512345 instead of 12345. This is fixed now.

FIXED:
At one of the last updates it seems that I accidentally replaced TEXT OPTION: FREE WEB SOURCES SCRIPT CODE FOR DJ SETS IN ONE FILE TRACKLIST SCRIPT and TEXT OPTION: FREE WEB SOURCES SCRIPT CODE FOR MULTISONG-TRACKS TRACKLIST SCRIPT with TEXT OPTION: FREE WEB SOURCES SCRIPT CODE FOR STANDARD SCRIPTS. This is fixed now again and gives you the possibility to treat these special scripts different from the standard scripts.


@ stevehero & MP3Joe:
You don't need you the code for the TEXT OPTION: FREE WEB SOURCES SCRIPT CODE FOR... fields any more. Please set them back to "#" (without quotation marks) and type your desired date format (MMDD for stevehero, DDMM for MP3Joe) in the new TEXT OPTION: DATE FORMAT (DD/D = day, MM/M/MON/MONTH = month, YYYY/YY is year) field.