[WS] Discogs ALL

OK,
I made this script long long time ago (~2 years or so), i never thought about publishing it but i find it very useful for me, so I decided to do it. I'm not a coder and I made it long time ago, so don't expect me fixing bugs or updating it. However it's pretty much complete (at least how I imagined it) and it works just fine for me.
EDIT: I change my mind, I will try to develop it further.

The idea was to tag & rename large amounts of full releases (ablums, vinyls, ect.), extracting as much information as possible.

Fills these tags:

BAND
BANDNAMEVARIATION
ARTIST
ARTISTNAMEVARIATION
ALBUM
TITLE
TRACK
VINYLNUMBER
TOTALTRACKS
DISCNUMBER
DISKNAME
TOTALDISCS / TOTALVINYLS
MEDIATYPE
RELEASETYPE
PUBLISHER
CATALOG
GENRE
STYLE
COUNTRY
YEAR (year only)
RELEASEDATE (full date)
RELEASETIME (not formated)
COMPILATION (Yes/No)
MIXARTIST (Remix)
COMPOSER
CREDITS
WWW
DISCOGSID
MASTERID
<!--sizec--></span><!--/sizec-->

Renames directory and files to something like

[CAT 001] Album Artist - Album (YEAR)
    00 Album Artist - Album (YEAR).m3u
    00 Album Artist - Album (YEAR).sfv
    00 Album Artist - Album (YEAR).txt
    A Track 1.mp3
    B Track 2.mp3

For Various Artist releases:

[CAT 001] Album Artist - Album (YEAR)
    00 Album Artist - Album (YEAR).m3u
    00 Album Artist - Album (YEAR).sfv
    00 Album Artist - Album (YEAR).txt
    01 Artist 1 - Track 1.mp3
    02 Artist 2 - Track 2.mp3

This script has a lot of fixes for discogs and extras, so that all you tags and files look alike.

How to use it?

  1. Find your release at www.discogs.com.

  2. Copy it's id (i.e. http://www.discogs.com/Age-Of-Love-The-Age.../release/116283, you need 116283).

  3. Drop your files to Mp3tag.

  4. Delete all present tags (Not necessary anymore)

  5. Run "Tag sources -> Discogs_xml_all"

  6. Paste id (search field sould be like this 116283)

  7. Aplly tags.

  8. Run actions:

    1. Discogs_XML *NEEDED* to complete tagging, run this first, put it at the top of the actions list.
    2. MixedCD check this ONLY if you have CD ripped to a single track, otherwise it will mess up your tags.
    3. RenameLabels rename your files, folder, export .m3u playlist, .sfv checksum and txt release info. If you will uncheck it your files will be tagged, but not renamed, moved, no info exported and ect.
      NOTE: Script will move your tagged files' dir to E:\Music_labels\%PUBLISHER% (that's where i store my music). If you do not want that delete last command line in Actions --> 3. RenameLabels, or change dir to which one suits you better.

CHANGES in v2.09:
FIX: Credits fix.

CHANGES in v2.08:
FIX: More code fix.

CHANGES in v2.07:
FIX: Issues related to renewed Discogs API.
ADD: New field - MASTERID.

CHANGES in v2.06:
FIX: Small track numbering issue.

CHANGES in v2.05:
ADD: New field - RELEASETIME.
FIX: Tracklisting issues.
CHANGE: improved text export,also .nfo instead of .txt.

CHANGES in v2.04:
FIX: DISCNAME bug.
FIX: Minor NOTES issues.
FIX: Improved TOTALTRACKS obtaining method.

CHANGES in v2.03:
FIX: DISCNUMBER issues.
ADD: New field - WWW with link to discogs.
ADD: Now you can run actions more than once.

CHANGES in v2.02:
CHANGE: CREDITS now is sorted by role (just like in discogs).
CHANGE: Removed artist name variations from CREDITS.
ADD: COMPOSER tag, filled from Composer, Written By,
Music By and Producer.
FIX: A lot track fixes.

CHANGES in v2.01:
ADD: Removes Dupe PUBLISHER and CATALOG values.
ADD: Grabs all genres instead if first one.
ADD: If DJ mix is present, it is written to BAND tag.
ADD: Overall credits are separated from per track credits.
FIX: Now TRACK, TOTALTRACKS, NOTES, COUNTRY, MIXARTIST
should work fine.
FIX: More minor fixes.

CHANGES in v2.00:
CHANGE: Now you can run actions only once after applying tag
from web source.
CHANCE: All credits go to CREDITS tag, also Remix credit goes
to MIXARTIST tag.
CHANGE: Script should run a lot faster.
ADD: Added name variations.

CHANGES in v1.23:
ADD: New tags - SONGWRITER, CELLO, MELODICA, SAXOPHONE, VIOLA, VIOLIN.

CHANGES in v1.22:
ADD: New tags - LEADER, ORGAN, TECHNICIAN
FIX: RELEASETYPE issues.
FIX: There was per track credits bug.

CHANGES in v1.21:
ADD: Removes up to five dupe tag values like 2x same label,
catalog or credits artist.
FIX: Minor bugs.

CHANGES in v1.20:
FIX: More credits issues.
FIX: Minor NOTES fix.
ADD: New tags - CHOIR, DIRECTED, BASS, CONCERTMASTER, DRUMS,
ACCORDION, GUITAR, PERCUSSION, STRINGS, TRUMPET, FLUTE,
ADAPTED, ENSEMBLE, PIANO, MUSIC, SYNTHESIZER, THANKS.

CHANGES in v1.19:
FIX: "Empty fields" bug. Script did not work with releases
that had empty date, country or style.

CHANGES in v1.18:
FIX: More minor fixes.
CHANGE: TOTALTRACKS field now supports up to 9CDs releases (was 2CDs).
ADD: New tag - DISCNAME.

CHANGES in v1.17:
FIX: NOTES formating.
ADD: New tag - COMPILATION [Yes/No]
CHANGE: m3u, sfv and txt filenames.

CHANGES in v1.16:
FIX: More credits issues.
ADD: New tag - NOTES.
CHANGE: Improved cover art fetching.

CHANGES in v1.15:
FIX: Credits issues.
ADD: TOTALTRACKS for vinyls.

CHANGES in v1.14:
FIX: Credits issues.
ADD: New tag - TOTALVINYLS.

CHANGES in v1.13:
FIX: There was some errors, but now it seem works fine.

CHANGES in v1.12:
FIX: Track number issues.

CHANGES in v1.11:
ADD: Cover Art Support.
ADD: New fields added: VINYLNUMBER, KEYBOARDS, ARTWORK, PHOTOGRAPHY.

CHANGES in v1.10:
FIX: Now saves all credits, including "overall". There was error in actions.
FIX: Properly saves tags witch includes named vinyl or disk sides like this.
FIX: Did not fixed artist names from "Artist, The" to "The Artist" witch
included "(#)" at the end, like this one.
ADD: You can leave your curent tags, script should auto-remove them.
ADD: Auto exports .m3u playlist, .sfv checksum and .txt release info.
ADD: Auto move to dir where i store files.
CHANGE: Underdashes "_" replaced with spaces.

v1.00:
First public version.
That's it. I've put a lot of hard work into it. I hope you like it.
Feel free to modify it for your needs.
Also if you need any help, just ask.

Discogs_ALL_API_v2.09.zip (7.84 KB)

Dear Pufas! Thanks a lot for Your great script. It has great possibilities. But I would like to know, how can I correct these lines when I get info from discogs

If in page of discogs I see:
"Producer, Written-By - Markus Boehme , Martin Hensing"

but after using Your script it returns lines like this:

ByMarkus BoehmeProducerWritten ByMartin Hensing

How can I correct Your script to get needed line "Producer, Written-By - Markus Boehme , Martin Hensing" copied to COMPOSER line?

Also, Your script doesn't get an ARTWORK from discogs. How can I add it or can you improve it?

Thank You

Hi, I'tje getting an error when it tries to load the DISCNUMBER.

Anyone esle having this problem?

Thanks for you work Pufas, very impressive script

You can try add this code after # DISCOGSID section (next line after sayuntil """ ):

# Coverurl
outputto "coverurl"
findinline "\">"
if "<images>"
    findinline "uri=\""
    sayuntil "\" uri"
    findinline "</images>"
endif

UPDATE: more correct code

Dear Forum,

Agree with previous speakers that this is an amazing script rivaling Dano's masterpieces over the years. It's tragic it's not developed anymore. After the big Discogs Upgrade of their site I have 3 things not working

  • Overall Credits don't come out at all
  • Track Credits come out like this CelloMatt McGeever
  • After adding the small Cover Art piece of the script I get a pic, but the wrong one

Anyone proficient enough to dig in to this scrip to see if it's fixable?

//Windjammer

I think I fixed most errors. Except for Credits (other) and regex action, unfortunately.
I share the result if it is interesting community. I need a little more time to fine-tuning.
Pufas script really very cool

I think you can use replace action for clean it.

replace CREDITS PER TRACK "" by ";"
replace CREDITS PER TRACK "" by ", "
replace CREDITS PER TRACK "" by ""
replace CREDITS PER TRACK "" by ""

test version in attach

I will replace some field and explain it later..

UPD: and actions file (use after script)

Discogs_xml_all_mod_aa.src (19.2 KB)

Discogs_xml_all_mod_id.src (19 KB)

Discogs_XML_mod.zip (497 Bytes)

Great work morrison! Really like what you have done so far with the ID Search dialogue, the Cover Image and solving the LP problem with track numbers using letters (and not numbers).

Discovered that Dano's "Discogs by Release ID Extended"script (attached) brings in the Track Credits just fine. The original brought it into the "MixArtist"-field and I have changed that to bring it into the "Comments"-field instead which suits me better. I also placed the "Track Temp"-field in a "VinylNr."-field instead.

The structure of the script file seems to be very different than the one from Pufas so I don't know how much you can use, but since you seem to know more about scripting than me... The thing I haven't found anything to bring in to mp3tag is Over All Credits.

//Windjammer

2009-10-05
Edited the "Track Temp"-field name again in Dano's script and called it "Vinyl Track" instead, like in the Pufas script.

_Discogs_by_Release_ID_Extended_by_Dano__Modified.src (6.47 KB)

Thanks for reply Windjammer, I will try do something with credits later

Wow. When I posted this script I never imagined people fix bugs and improve this script, so i "abandoned" this post. I see there is some progress here so maybe I will continue developing this script after all.

EDIT: I edited first post, read it for more info.

Pufas,

Absolutely fantastic that you changed your mind! I cannot find your updated script? The .SRC file is still dated 2009-07-20 and the link to the ZIP above says 1.00...

Sorry, by mistake I've reuploaded old script. Try now. And remember you HAVE to run Discogs_XML action to complete tagging!

This looks very, very nice. Thank you for your hard work.

The only two things that seem to be glaring omissions is that the script doesn't seem to grab album artwork & for the tracks I have tested the script on the track list window is empty so I can't move my selected track up and down to make sure it gets tagged properly, i.e. I had run the script against a song that was track 6 on the CD and there was no way to make the script understand it was not track 1.

Again, thank you for your work on this. It's obvious it was not an easy task.

  1. Personaly I don't like storing art data inside mp3, but since a lot of users does, I will add it.
  2. About that mess with tracknumbers: this was caused by saving tracknumber tag. It looks like mp3tag does not like that, and prefers counting files by himself. I guess I'll have to move vinyl track numbers to some other tag.

As soon as I'm done fixing I will upload new version.

I added cover grab, but fixing tracklist is a real headache. I keep getting very unexpected results while trying to tag this:

Total output:
 output["CurrentUrl"]= "http://www.discogs.com/release/2796?f=xml&api_key=1e48c7f4e4"
 output["CurrentPreview"]= "http://www.discogs.com/release/2796?f=xml&api_key=1e48c7f4e4"
 output["Output"]= ""
 output["DISCOGSID"]= "2796"
 output["COVERURL"]= "http://www.discogs.com/image/R-2796-1144684772.jpeg"
 output["BAND"]= "CJ Bolland"
 output["ALBUM"]= "DJ-Kicks"
 output["CATALOG"]= "!K7038CD"
 output["PUBLISHER"]= "Studio !K7"
 output["TOTALDISCS"]= "1"
 output["NOTES"]= ""
 output["TOTALTRACKS"]= "15"
 output["MEDIATYPE"]= "CD"
 output["RELEASETYPE"]= "Compilation, Mixed"
 output["GENRE"]= "Electronic"
 output["STYLE"]= "Techno, Acid"
 output["COUNTRY"]= "Germany"
 output["YEAR"]= "1995"
 output["RELEASEDATE"]= "September 4, 1995"
 output["DISCNUMBER"]= "1"
 output["TRACKS"]= "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|"
 output["ARTIST"]= "Patrick Pulsinger|Damon Wild &amp; Tim Taylor|Joey Beltram|Magenta|Bandulu|Nexus 6|B.C.|Manuel And Clive|Planetary Assault Systems|Rotortype|Clementine|Sound Enforcer|Transits Of Tone|Planetary Assault Systems|Phrenetic System|"
 output["TITLE"]= "Construction Tool|Bang The Acid|Drome|Boost!|Presence|Ab-Chic (Acrid Abeyance Remix)|Stronghold|Recognised|In From The Night|Be Yourself|Breaking Point|Re-Enforcement|Stormer|Starway Ritual|Wayfarer|"
 output["DJMIX"]= "CJ Bolland, "
 output["TMP"]= ""
 output["COMPILED"]= "CJ Bolland, "
 output["TMPCR"]= "<role>Written By</role><name>Patrick Pulsinger</name>|<role>Written By</role><name>Damon Wild &amp; Tim Taylor</name>|<role>Written By</role><name>Joey Beltram</name>|<role>Written By</role><name>Cari Lekebusch</name>|<role>Written By</role><name>Bandulu</name>|<role>Remix [Uncredited]</role><name>Acrid Abeyance</name><role>Written By</role><name>E-Harmonix</name><role>Written By</role><name>Tom De Luxe</name>|<role>Written By</role><name>B.C.</name>|<role>Written By</role><name>Manuel And Clive</name>|<role>Written By</role><name>Luke Slater</name>|<role>Written By</role><name>Cari Lekebusch</name>|<role>Written By</role><name>Luke Slater</name>|<role>Written By</role><name>Dave Angel</name>|<role>Written By</role><name>Chris Hawkins</name><role>Written By</role><name>John Litchfield</name><role>Written By</role><name>Leigh Savage</name>|<role>Written By</role><name>Luke Slater</name>|<role>Written By</role><name>Axel Stephenson</name><role>Written By</role><name>Frederico Santini</name>|"
 output["Error"]= "<OK>"

Debug log says tags are fine but preview window messes everything up:

This happens when I edit line 332 from:

outputto "TRACK"

to:

outputto "TRACKS"

or add "TRACKS" tag anyhow.
I believe we will need help from mp3tag developers.
I attached latest version of my script in this post.
EDIT: Removed - outdated script.

Don't feel like you need to add it on my account. I use a different program to get my album art as I like it to be certain sizes so the functionality is not that important to me. I was just making a comment on it.

You'll think of a way, I'm sure. You're very clever. I don't think many other people have made the leap to writing tagging scripts that work in tandem with action scripts so that shows me you have more ingenuity than a lot of us.

All we need now is for Florian to add a way to invoke action scripts from within tagging scripts (and maybe vice versa) and there's no limits to what you'll be able to accomplish! :slight_smile:

I'm really looking forward to seeing what you add next. It's always a pleasant surprise.

Thanks for the quick turn-around! Maybe you could take a look at the other discogs scripts here in the forum? Or perhaps start up a conversation with Dano. He seems to be the other scripting genius here and he's got a Discogs script of his own so I am sure he could probably tell you where the problem is.

Yeah, I think I'll do that.

Thanks to Dano, everything seem to work now. I'll finish editing script and re-post it.

Geez, Pufas...you're like a machine! Post a script, take two years off, and then return with a fury! LOL!

Thanks!