[WS] Discogs (pone mod)

Hi Pone,

Discogs did some changes.

Released, Genre and Style are now links.

Therefore %YEAR% is not recognized anymore, but Genre and Style still are. <_<

will be fixed soon, thanks for reporting

Is there any way to add the rip/get the date from discogs to show up in the fields. The year is fine but some albums etc have the full date so is it possible to have from discogs info (see attached screen-shot)

mp3tag info:
Year: 2008
date: 0102

Thanks


I'm not planning to do this for this script for the sake of consitant year formats . But it is possible for sure.
If I have some time I'll make you a guide.

Scripts are updated (2.6) and working again.

Changed: The "direct by URL" search script can now also handle URLs which start with www. instead of http://www. if found in the %www% tag field (not as manual input)

Changed: In the search part %album% has got some more repalcements of words like CD, Vinyl, Web, Cd1, ... which spoil the search matches at discogs. If you need to search for a release which has one of these words at the end (like "Save the Vinyl", "First CD", "Caught in the Web") you must write i now manually in the search box.

Fixed/Changed: Albumartist "Various" was not changed into "va" in the last version. Now it is "va" again.

Fixed: %year% was not writen after changes at discogs. fixed

Fixed: There were additional spaced between the genres after changes at discogs. fixed

Fixed: Under certain rare cirucumstances quotationmarks in the title lead to html code in the title tag field. fixed

I droped the version which uses BAND instead of ALBUMARTIST for the old versions of Mp3Tag?
Is there still need for this?

I had a similiar request to Dano. He put it in his script.
But it is given the full date. eg: 2011-03-02 (YYYY-MM-DD)

I added a line for releases where only Year and Month is given, which outputs to 2011.03.00

Maybe it suits you, maybe pone will add is in his script.

This has to be right AFTER the year section in the script

# Full date
outputto "Date"
unspace
regexpreplace "<[^>]+>" "" #kt
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"
sayrest

BTW: Thanks for the new version of your script.

Put the code after year as described, but it was coming out with:
Year: 2005
Date: 2005-01-20

# Year
outputto ""
findline "class=\"head\">Released:"
moveline 3 1
findinline "&year=" 1 1
sayuntil "\""

# Full year
outputto "Year"
unspace
regexpreplace "<[^>]+>" "" #kt
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"
sayrest

Solved the problem by changing:

Year

outputto "Year"
TO

# Year

outputto ""

Full date

outputto "date"
TO

# Full year

outputto "Year"

Now it simply comes out with:
Year: 2005-01-20 (Just the way I want it)

Have never scripted before so it was hit and miss but it seemed to work. :stuck_out_tongue:

I thought that was your goal to have the two sperated.

But:

If it now suuits you even better.

UPDATE (v2.7):

I spent a lot of time to get some of the more complex tracklistings at discogs with the script. Here is the result of the last days work.

New: A new tag field called CHAPTER. The chapters or disc names found as headlines above or between the tracklist at discogs.
Look at this pages for examples:
http://www.discogs.com/Joy-Division--Singl...release/2586049
http://www.discogs.com/Kraftwerk-Der-Katalog/release/1996371
http://www.discogs.com/Erykah-Badu-Mamas-G.../release/424341

New: A extra script called "tracklist for albums with multi song tracks". It's for albums which combine more (but not all) songs in one track/file. Run it AFTER you tagged the album with one of the other scripts.
It rewrites the tags Albumartist, Chapter, Discnumber, Track, Track Temp, Artist, Title, Mixartist. The different songs are seperated by "/" within a track.

At the moment, it groups songs with the following tracknumber patterns (track 3 is the grouped track):
1, 2, 3a, 3b (example: http://www.discogs.com/Robag-Wruhme-Wuppde...release/2614288 )
1, 2, 3A, 3B
1, 2, 3.a, 3.b (example: http://www.discogs.com/Tayo-FabricLive-32/release/899274 )
text 1, text 2, text 3a, text3b (example: http://www.discogs.com/Richie-Hawtin-DE9-T.../release/554040 (but chapter recognition does not work here) )
1-01, 1-02, 1-03.1, 1-03.2 (example: http://www.discogs.com/Joris-Voorn-Balance...release/1639822 )
01, 02, 03.1, 03.2 (example: http://www.discogs.com/Richie-Hawtin-DE9-T.../release/555017 )

If chapters have a own track-positions, neither chapter recognition nor tracklist correction is working correct.
Basically these are wrong formated discogs pages. They use Track Position instead of Track Index for the disc titles/chapters.
examples:
http://www.discogs.com/Richie-Hawtin-DE9-T.../release/697759
http://www.discogs.com/Various-The-Kings-O.../release/814835

as always: feel free to write comments and suggestions!

  • see starting post for download -

I made a Mp3Tag action group which generates a .cue file for dj mixes (or other compilations) in one file.
It's a modification of a scirpt I made for general tracklists.
Optimized now for use in combination with my discogs scripts. Works pretty fine!

Instalation:

  1. Download the zip file & extract the folder structure to %appdata%\mp3tag

Usage:

  1. Run any of my discogs-scripts to do the basic tagging of the audio file.
  2. Run my "tracklist for DJ Sets in one file" script, to get the tracklist into the file.
  3. Run the actiongroup, to generate a .cue file.
  4. Delete the tracklist-section in the UNSYNCEDLYRICS field manually to avoid double storage of the tracklist data.
    Or, alternatively, click Edit > Undo (Ctrl+Z) to restore the tracklist as it was before the action in the UNSYNCEDLYRICS field. The cuefile does not get deleted by this undo process.

Comments:

  1. If the tracklist from discogs has not tracklengths, no cuefile can be generated.
  2. For double CDs, you have to delete the parts of the tracklist which don't belong to the file manually after step two.
  3. I recommend having the UNSYNCEDLYRICS field in the tag panel, as my script is not fully automatic (usage step four, comments one & two).

I have only tested a few pages so far. Works fine on most releases. Even most of the more complicated tracklists (see posting above) work.
Mixarists (Producer,Remixer,...) can not be written into the cue file as far as I know. So you have a slight loss of information, when you transfer the tracklist form the UNSYNCEDLYRICS tag field into the .cue file and delete the tracklist in the tag field afterwards. Just wanted to point on that. If anybody knows how to implement a field like MIXARTIST into a cue file, please let me know.

The actiongroup will be packed into the next update of the script.
Improvement suggestions and reports of discogs pages which don't work are welcome!

Download:

Cue_Sheet__Discogs_Pone.zip (1.57 KB)

At first thanks a lot for your mod plone! I just registered here just because of your script.
I've one question: Which tag are you using for Mediatype? When I click on
Extras -> Options ->Tag-Panel -> Add -> MEDIATYPE
the discogs-tag like "Vinyl, 12'' EP" does not show up. I've used this field recently for storing this information. Aren't you using the mediatype-field mp3tag uses?

Another question: Can you tell me how to edit your script, to only store one of the following in MEDIATYPE:
Vinyl (i.e. Vinyl, 12", 45 RPM)
WEB (i.e. 2 x File, MP3, 320 kbps)
CD (i.e. CD, Compilation, Mixed)

And one last thing:
I would like to store the original year in this format yyyy-mm or yyyy if there is no month stored.

And once again, big thanks for your script! Now I'm one step closer to an ordered mp3 collection :slight_smile:

greetings TLO

I use DISCOGS_MEDIATYPE instead of MEDIATYPE because in many cases, the mediatype at discogs is not the same as my mp3s are from, e.g., discogs has often only the vinyl release listed when I have a web release mp3.
(See starting post for detailed listing of the tag fields the script is writing. Or open the exptended tag view in Mp3tag after you used my script: Alt+T :mt_tag: )

Information like Vinyl, WEB, CD is more commonly stored in the SOURCE tag-field. But there is no clear difference to be between MEDIATYPE and SOURCE. Maybe MEDIATYPE should be used to store information like Album/Single/Best-of/Compilation/Live Recording.
Discogs's Mediatype combines both, so I left it as it is.

Open the script with a text editor and search the following part:

change it like the following:

The changes are marked in bold type. outputto "Mediatype" changes the tag-field to MEDIATYPE as you want it. The regexpreplace replace the mediatype form discogs with the word in the second quotationmarks with if one of the word in the first quotationmarks is found. You can expand that list and make alternatives as shown with Vinyl.
For a list of the used formats at discogs, look here http://www.discogs.com/explore > Formats > Show More

If you edit the script, you have to edit all versions of it. I recommend the freeware text editor notpad++ There you can edit one script and paste the changes into the others automatically. But it's tricky with multiline replacements.

See the discussion of FreaQ and stevehero above how to do this. Or look at dano's discogs scipt to see how he is doing it: /t/1992/1

I have not included this in the script, because
a) i don't know if how different mediaplayers display different formats at YEAR
b ) the information is not always there at discogs
c) release pages is about different releases of the same album (master release page). these different releases often do not have the same release date. this is also true for the year itself, but you see the different years in the discogs-search-page/mp3tag-websource-index-window. With the month it gets to complex and unclear. You would have to check every release page to see the different dates if you want to get sure you have the first release date.
d) as it is this complex, I think the release dates at discogs are not always correct, discogs users see the release date in their country and just asume it to be the global release date. And also the other way around.

I'm working on a new major update to version 3.0

The main issue is, that there will be a mp3 file in which you can make settings for the script by changing the values of the mp3 file. After that, you get export scripts, which create the web sources scripts with your settings.

That takes web sources to another level by providing easy accessible options!

If you have any whishes for options, be quick and let me know!

Update Version 3.0

Here it is, the Uptdate. I changed the whole concept of the web scripts. You don't get ready-to-use webscripts anymore, but a action & export group which creates your customized scripts after you edit a special mp3 file which stores the your personal settings.

And that is what has changed:

New: Options, Options, Options:

  • You can freely choose the names of all tag-fields!!!
  • You don't have to write all tag-fields.
  • You can choose if you want to combine Style & Genre in one tag-field or not.
  • You can choose if you want to combine Credits, Notes & Barcodes and Other Identifierers in one tag-field or not.
  • You can split Barcodes and Other Identifierers into two fields if you want.
  • You can write the same information into different fields.
  • You can choose between American (YYYY-MM-DD) and European (DD.MM.YYYY) date format.
  • You can choose if you want the albumartist be written for single-artist-releases or not.
  • You can choose if you want to download the coverart or not.
  • You can choose if you want to write multible genres, styles, labels, catalog#s of a release into multivalue tag fields or into one tag field seperated by comma.
  • You can choose if you want to write discogs' "Artistname, The" & "Lablename, The" as "The Artistname" and "The Labelname".
  • You can choose if you want to write discogs' "Artistname (2)" & "Lablename (2)" as "Artistname" and "Labelname".
    The default stetting of all options is like they were on the previous versions of the script.

New: A export script to create cue files for dj sets in one file.

New: Additionally to the release year, the release date can now be written.

New: Barcodes and Other Identifierers can now be written.

  • see starting post for download -

I hope it works all now. Let me know if there are some troubles.

Hi pone,

Thanks for all your hard work on these tagging scripts - i use them all the time.

It's probably me being stupid but I thought I'd post what happened to me in case any one else makes the same mistake.

I thought I was going crazy because after editing the tag field values to my liking (I prefer "Release Date" instead of "Date" and copying albumartist to album artist for foobar compatibilty and splitting barcode from other identifiers.) and then performing the action -> create scripts I couldn't figure out why the changes weren't being applied. It turned out that the action wasn't overwriting the existing scripts but creating a new folder within the pogram directory labelled "$getenv(appdata)". Once i figured this out & pasted newly written script into correct location it worked a treat.

p.s. If you do any updates it would be nice to have TOTALDISCS, TOTALTRACKS, AND TOTALVINYLS.

Thanks again!

Laney

Oh, I haven't thought about this: You need the Mp3tag 2.48a or newer!
/t/455/1

Because $getenv() is a new scripting function. $getenv(appdata) automatically gets the right directory in every Windows version where the mp3tag application data is stored.

Otherwise you have to manually move the files as you described it.

Thanks for pointing me to this.

P.S.:
I will see what i can do about TOTALDISCS, TOTALTRACKS, and TOTALVINYLS. These information is not stored at discogs, but it might be possible, I will have a look.

What is the difference between TOTALDISCS and TOTALVINYLS?
Would you count Side A and B as two or one VINYLS?

I think TOTALDISCS could be done by taking the discnumber of the last track.

For Vinyl I have no discnumbers. Maybe i can add replacements: a -> 1, b -> 2, c ->3, ...
Or should it be: a -> 1, c -> 2?

All this is a bit tricky and will not work for all releases, since the discnumber recognition depends on the way the track position is written at discogs.com. And this is not consitend with all pages.

Thanks for the quick response.

It would have saved a lot of grief had I known about the release compatibilty earlier :smiley:

I was getting TOTALDISCS, TOTALTRACKS and TOTALVINYLS from the script that Pufas wrote. I don't really understand how the scripts work but I'm sure it'll make perfect sense if you have a quick look.

Side A and B would be 1 vinyl, i.e. TOTALVINYLS is the number of physical bits of plastic.

I don't know if there is a difference between TOTALDISCS and TOTALVINYLS besides indicating the type of media. Maybe the two could be combined to be called TOTALMEDIA (this would then be inclusive of cassettes.)

So maybe TOTALTRACKS and TOTALMEDIA would be a good addition to the options in your script - I appreciate it's hard to be compatible with all Discogs releases so no worries if it can't be done.

Thanks again!

Ahhhhggggrrrrr!
Just one day after my 3.0 update discogs has made changes on their site again.
Scripts are not working anymore, nor are the old versions.
I'm working on a new update again.

Wouldn't it be better if each tag related command block is saved in a separate file so it can be reusable in script (.src) source files? Web Source Framework Discussion A nice-to-have option.
Thus you change centrally a tag related source code.
And each script file could be easier managed.

My condolences!
This proves what I've always said. The Mp3tag source scripting is not flexible enough to adapt themself automatically to changes made in the xml/html source text.
It is a bottomless pit and you will constantly have to do with updating your scripts.

DD.20110406.0704.CEST