[WS] Discogs (pone mod)

Hi Pone,
I think I found a bug:
Just wanted to tag this release: http://www.discogs.com/Nautiluss-2-x-Lord-...release/3134844
There are two aritsts on the release (Nautiluss x Lord Skywave). The x is something like a new & I think and should not be written into the tags!?
Cheers,
Tlo

That's wanted behaviour, no bug.
My script writes all linking words and characters between artist names as the are found at discogs. And discogs' rule is to write them as they are found on the media. And you can assume that the aritst had some reasons to write "x" instead of "&", "vs.", "feat.", "meets" or whatever.
If I should replace it, I would also have the problem to decide with what i want to replace it.
And furthermore the question, which other similar used characters and words I should replace.

Hi Pone,

I am using a Tag DISCOGS_RELEASETYPE

If it is an MP3 Release the Bitrate is written 320 kbps

I think the HTML code is not properly filtered within your script.
It is no big issue but a bit annoying to fix this manually

Thanks for reporting. I'll care for that.

It also seems that discogs changed some little thing on the search pages today or yesterday. At the moment only the API-List and Direct by scripts are working.

Update will come soon. Maybe today, at the latest by Monday...

Any other problems anyone?

Just read the post above of yours.

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.

Hi Pone,
As you may know by now I like the format:
Date: MMDD
Year: YYYY-MM-DD

I couldn't for the life of me figure out how to use your options to get the results. So I had to put it in the following for it to work:
DISCOGS_DATE: no
DISCOGS_YEAR: no
TEXT OPTION: DATE FORMAT (DD/D = DAY, MM/M/MON/MONTH = MONTH, YYYY/YY = YEAR):no

TEXT OPTION: FREE WEB SOURCES SCRIPT CODE FOR STANDARD SCRIPTS:

outputto "year"
     gotoline 3
     findline "class=\"head\">Released:" 1 1
     findline "&year=" 1 1
     findinline "&year" 1 1
     if "="
         joinuntil "</a>"
         unspace
         regexpreplace "<[^>]+>" ""
         replace "Jan" "-01-"
         replace "Feb" "-02-"
         replace "Mar" "-03-"
         replace "Apr" "-04-"
         replace "May" "-05-"
         replace "Jun" "-06-"
         replace "Jul" "-07-"
         replace "Aug" "-08-"
         replace "Sep" "-09-"
         replace "Oct" "-10-"
         replace "Nov" "-11-"
         replace "Dec" "-12-"
         regexpreplace "[^-0-9]" ""
         
         regexpreplace "(\d\d)-(\d\d)-(\d\d\d\d)" "$3-$2-$1"
         regexpreplace "-(\d\d)-(\d\d\d\d)" "$2-$1-00"
         regexpreplace "(\d\d\d\d)$" "$1-00-00"
         sayrest
     endif
     
     outputto "date"
     gotoline 3
     findline "class=\"head\">Released:" 1 1
     findline "&year=" 1 1
     findinline "&year" 1 1
     if "="
         joinuntil "</a>"
         unspace
         regexpreplace "<[^>]+>" ""
         replace "Jan" "-01-"
         replace "Feb" "-02-"
         replace "Mar" "-03-"
         replace "Apr" "-04-"
         replace "May" "-05-"
         replace "Jun" "-06-"
         replace "Jul" "-07-"
         replace "Aug" "-08-"
         replace "Sep" "-09-"
         replace "Oct" "-10-"
         replace "Nov" "-11-"
         replace "Dec" "-12-"
         regexpreplace "[^-0-9]" ""
         
         regexpreplace "(\d\d)-(\d\d)-(\d\d\d\d)" "$3-$2-$1"
         regexpreplace "-(\d\d)-(\d\d\d\d)" "$2-$1-00"
         regexpreplace "(\d\d\d\d)$" "$1-00-00"
         regexpreplace "(\d\d\d\d)-(\d\d)-(\d\d)" "$2$3"
         sayrest
     endif

If I could do this in the options that would be great. Thanks.

Hm, you can't get that straight away from my script without using the TEXT OPTION: FREE WEB SOURCES SCRIPT CODE... fields. The reason for that is, I have made this formating options only for the DISCOGS_DATE field. DISCOGS_YEAR is alway just the year in four digits.

The only thing you could do to make it somehow shorter is:

DISCOGS_DATE = date
DISCOGS_YEAR = no
TEXT OPTION: DATE FORMAT (DD/D = DAY, MM/M/MON/MONTH = MONTH, YYYY/YY = YEAR) = MMDD
TEXT OPTION: FREE WEB SOURCES SCRIPT CODE FOR STANDARD SCRIPTS =

outputto "year"
     gotoline 3
     findline "class=\"head\">Released:" 1 1
     findline "&year=" 1 1
     findinline "&year" 1 1
     if "="
         joinuntil "</a>"
         unspace
         regexpreplace "<[^>]+>" ""
         replace "Jan" "-01-"
         replace "Feb" "-02-"
         replace "Mar" "-03-"
         replace "Apr" "-04-"
         replace "May" "-05-"
         replace "Jun" "-06-"
         replace "Jul" "-07-"
         replace "Aug" "-08-"
         replace "Sep" "-09-"
         replace "Oct" "-10-"
         replace "Nov" "-11-"
         replace "Dec" "-12-"
         regexpreplace "[^-0-9]" ""
         
         regexpreplace "(\d\d)-(\d\d)-(\d\d\d\d)" "$3-$2-$1"
         regexpreplace "-(\d\d)-(\d\d\d\d)" "$2-$1-00"
         regexpreplace "(\d\d\d\d)$" "$1-00-00"
         sayrest
     endif

Mmh, I was sure I tried that already. Thanks. Maybe an option to format the year in a future release might be handy :]

I just noticed discogs changed a little detail at their search pages. All my script show " - " at the cover column for all releases at the list of search results.
That affect only the list of results, the script still stores the cover in the normal way.

I will wait a few days with the update for this little thing, until I see if discogs is going to change at their API in the next days. I was anounced for December 15/17, but today I got a email which said January 15.

Maybe. That would basically be two date fields. I'm trying to keep the script as short as possible. For extra special requests like that I have designed the TEXT OPTION: FREE WEB SOURCES SCRIPT CODE ... fields.

Is
Date: MMDD
Year: YYYY-MM-DD
a requirement by any software you are using or is it just your personal liking? I don't see the need of a date field if the date is already stored in the year field.

I'm using Traktor so it uses the format YYYY-MM-DD to read the release date.

DATE is just a back up. Becuase I first tag my songs and then run them through a program called 'Mixed In key' for finding the key of each song. It strips the MM-DD from the YEAR. I then use your action you done for me which fixes the YEAR back to YYYY-MM-DD and it also takes the MMDD from the DATE and places it in the YEAR.
For_mat_DATE__YEAR__Credit_Goes_To_Pone_.zip (359 Bytes)
I suppose I could just have created a TAG for YEARBACKUP but I have the date shown in my column in mp3tag which is easier visually to see. You see. :]

For_mat_DATE__YEAR__Credit_Goes_To_Pone_.zip (359 Bytes)

If DATE is just a back-up, does the format matter?
If "MM-DD" or even "-MM-DD" would be also OK, you could shorten the settings for my script (which also doesn't really matter, once you have done it).

For:
Date: MM-DD
Year: YYYY-MM-DD

DISCOGS_DATE = date
DISCOGS_YEAR = year
TEXT OPTION: DATE FORMAT (DD/D = DAY, MM/M/MON/MONTH = MONTH, YYYY/YY = YEAR) = MM-DD
TEXT OPTION: FREE WEB SOURCES SCRIPT CODE FOR STANDARD SCRIPTS =

outputto "year"
 say "-"
 sayoutput "date"

(would give you "-" for DATE if the year is missing at discogs)

For:
Date: -MM-DD
Year: YYYY-MM-DD

DISCOGS_DATE = date
DISCOGS_YEAR = year
TEXT OPTION: DATE FORMAT (DD/D = DAY, MM/M/MON/MONTH = MONTH, YYYY/YY = YEAR) = -MM-DD
DISCOGS~PONE COPY 1 SOURCE = date
DISCOGS~PONE COPY 1 TARGET = year
(would give you an empty DATE field if the year is missing at discogs)

I should be possible to change the backup action in such a way it can deal with MMDD, MM-DD and -MM-DD.
e.g.: $replace(%date%,-,) would simply eliminate/ignore the dashes.

btw:
I'm using Traktor, too. But only for a small part of my huge music collection. When I have a DJ gig (which is not so often), I pre-select the tracks which I load into Traktor. Like a vinyl DJ would go to his shelves to fill his dj-cases. So only a small part of my collection has those "YYYY-00-00" YEAR fields. I'm just ignoring that, or even use it as a marker for the tracks which I would play as DJ.

I suppose it doesn't but I was a newb when I decided I wanted the DATE format MMDD :smiley:
The solution I have ATM works perfect because it fills the DATE with 0000 when there is no MMDD in discogs for the release.

Thats basically why I have the YEAR like that. Its a real shame Traktor didn't go down the smart playlist route with PRO2 :[ Think they missed a trick there!

Noticed lately, when using Artist /Album script... script does not recognize Artist and or Album. Message: Sorry can't find...

  1. I know it's correct.
  2. Only way to get info is to use either the album or the artist as a single search... and then you can download the tag.
  3. However, even after you get the info from script and try to do a Artist/Album search it still comes back that it doesn't exist.

Any idea what's going on... This is only for the Artist & album Search.

Thanks

Do you have the latest version, 3.13 ?
Is it with every release or only with some?
What do you mean with "does not recognize Artist and or Album"? Is there a problem with reading the ID-Tags of your file to automatically fill the search box?

It's working fine for me.

Hi pone. I'm using a modified version to retrieve year only (it also automatically selects the earliest year), but since discogs updated their site, I can't get the thing to work. I'm gonna need your help with this.

Script 1

[Name]=Discogs album year only without control
[AlbumUrl]=http://www.discogs.com/advanced_search?artist=%s&range=after&year1=1800&btn=Search+Releases&sort=year%2Casc
[WordSeperator]=+
[SearchBy]=$regexp(%artist%,^The (.*),$1)&release_title=%album%

[ParserScriptAlbum]=...
outputto "YEAR"
joinuntil "<div id="footer_border">"
regexpreplace "(?<=div class="search_release_stats">\d\d\d\d<span).*" "$1"
SayRegExp "(?<=div class="search_release_stats">)\d+?(?=<span)"

Script 2

[Name]=Discogs track year only without control
[AlbumUrl]=http://www.discogs.com/advanced_search?artist=%s&range=after&year1=1800&btn=Search+Releases&sort=year%2Casc
[WordSeperator]=+
[SearchBy]=$regexp(%artist%,^The (.*),$1)&track=%title%

[ParserScriptAlbum]=...
outputto "YEAR"
joinuntil "<div id="footer_border">"
regexpreplace "(?<=div class="search_release_stats">\d\d\d\d<span).*" "$1"
SayRegExp "(?<=div class="search_release_stats">)\d+?(?=<span)"

this is quite different from my script. but I think i wrote that for you some time ago.
here is a new version. keep the frist part of your old scripts and replace the second part with this:

[ParserScriptAlbum]=...
outputto "YEAR"
joinuntil "<div id="footer_border">"
regexpreplace ".+?div class="search_release_stats">\s*(\d\d\d\d)\s*<span.+" "$1"
sayrest

Yes, you did, and thanks very much for it. And thank you once again for fixing it for me. :slight_smile:

hallo pone, happy new year!

for this release i get discnumber 15 for the last track (it's one track 15 in my folder).
http://www.discogs.com/release/1265185
do you have any idea, why?

EDIT: track 15 (last track) is also rewritten to 15.1

That's the kind of releae I have made the "tracklist for albums with multi song tracks" script for.
The last track consists of two songs, depicted as 15.1 and 15.2.
The standard scripts read this as disc 15, track 1 and disc 15, track 2. The "tracklist for albums with multi song tracks" script reads it correct.