Beatport.com WSS by stevehero [Release, Single Track & Artwork tagging]



    

Mp3tag ver required   v3.03d
Last modified              2020.11.10
Reading time              2 mins
Scripts download        beatport by stevehero v5.04 Scripts.zip (67.9 KB)

INSTALL + USE THE SCRIPTS

  1. Download the .zip file above (donate here, for a beer) and extract it to the %appdata%\mp3tag\data\sources directory. See this post for more info.

  2. Load your files into the Mp3tag UI, select the files you want to process and hit Alt+S, then the letter O, K etc. See below for scripts with their corresponding keyboard shortcuts.

SCRIPTS AVAILABLE AND KEYBOARD SHORTCUTS

  • ARTWORK Search by (Album)Artist + Release
  • ARTWORK Search by Release
  • RELEASE Direct by BEATPORT RELEASE ID
  • RELEASE Direct by Www(URL)
  • RELEASE Direct by www(URL) (Genre Tag Only)
  • RELEASE Search by Artist
  • RELEASE Search by Filename
  • RELEASE Search by (Album)Artist (150 Results)
  • RELEASE Search by (Album)Artist + Release
  • RELEASE Search by (Album)Artist + Release (150 Results)
  • RELEASE Search by (Album)Artist + Release (Genre Tag Only)
  • RELEASE Search by (Album)Artist + Release (Sorted by Date Asc)
  • RELEASE Search by (Album)Artist + Release (Sorted by Date Desc)
  • RELEASE Search by (Album)Artist + TiTle
  • RELEASE Search by DireCtory
  • RELEASE Search by ReleaSe
  • RELEASE Search by Release (150 Results)
  • RELEASE Search by TitlE
  • TRACK Direct by BEATPORT_TRACK_URL
  • TRACK Direct by BEATPORT_TRACK_ID
  • TRACK Search by (AlbuM)Artist + Title
  • TRACK Search by Artist + Title
  • TRACK Search by FiLename
  • TRACK Search by TItle

ADDITIONAL ACTIONS (OPTIONAL)

VERSION HISTORY

Beatport by &stevehero vX.X_Version History.md can be found inside the unzipped file.

WHAT FIELDS ARE OUTPUTTED

DISABLING FIELDS

Open all scripts and see the .:: R E M O V E F I E L D S ::. section at the bottom. Edit to your liking. Search this thread on how to do this.

EDITING THE SCRIPTS

Please download notepad++ and download steveheros Mp3tag Web Sources Language for Notpad++.zip 218.zip wrote by me to enable much easier viewing than in normal notepad does out of the box. Google how to install.

SPECIAL MENTIONS + A BIG THANK YOU

To @pone for his invaluable help and guidance throughout version 1 and also for the TRACK/TOTALTRACKS fix and not to forget @jaimz for the original code which got me scripting and developing the code it to where it is now.
@stevehero

GAME OVER.... :black_heart:


Any amount will be appreciated via donation link below. Also, please feel free to comment in the thread and I'll be happy to help.
Think of donating as a thank you instead of buying me a Guinness in some bar.

8 Likes

Nice to see the final version.
Good work!

1 Like

Thanks pone. Means a lot to hear you say that. :]

Thanks a lot. Very useful and seems to work flawlessly!

hey,

i just registered to say thanks. great work! it blows my mind what can be done with the web sources scripts API.

Any chance of this little beauty pulling the Key information of tracks? Is it offered in the api?

EDIT
The script now offers BPM and INITIAL KEY parsing. See starting post.

For some reason, when I try to tag by URL, it says the following:

"Error connecting to server: http://api.beatport.com"

This is the URL of one of the songs I am trying to tag.

http://www.beatport.com/track/so-much-love...lub-mix/2439233

Your error relates to using the wrong URL to parse beatport.com. Instead of using the track url use the release one such as http://www.beatport.com/release/so-much-love/438196 whereas track is like the url you posted relates to the individual track itself.

The script is not intended for individual tracks. The way I use it if there I have only one track from a release But in is to parse the album it relates too.

But in your case the track you are parsing is the only one on your realease.

UPDATE VERSION 1.1 OF 'BEATPORT.COM SCRIPTS BY STEVEHERO'
  1. added a search by title script.
  2. added leading zeros to track and totaltracks.
  3. added output of TRACK / TOTALTRACKS

See this post for update.

Had the same problem and could fix it by applying the following changes to the source-files:

Change the line with

[AlbumUrl]=http://api.beatport.com/catalog/releases/detail?v=1.0&format=xml&id=

to

[AlbumUrl]=http://api.beatport.com

and then change

regexpreplace ">\s+<" "><"
findinline "<release"<!--fontc--></span><!--/fontc-->

to

regexpreplace ">\s+<" "><"
say "/catalog/releases/detail?v=1.0&format=xml&id="
findinline "<release"<!--fontc--></span><!--/fontc-->

Hope this helps

adrian

Firstly thanks stevehero, dano and pone for these fantastics scripts. I only discovered the web sources forum yesterday and I've been tagging using the scripts since.

Ok the problem I'm having is that I'm happy with the existing ARTIST fields of the releases I'm tagging using the Steve's beatport script so I've been trying to customise it slightly so that this field is skipped when it comes to tagging. Not having much look I'm afraid.

Firstly I tried commenting out, using #, the lines below but the script no longer works properly when I do this (attachment 1)

# ARTIST findline "<performer" unspace joinuntil "" regexpreplace ">\s+<" "><" regexpreplace "]+>([^\"]+)" "<$1>$2" outputto "Artist" sayregexp "(?<=)[^<]+" "\\\\" "" say "|" gotochar 1

I've also tried commenting out only the line that says...

outputto "Artist"

... but that doesn't work correctly either (attachment 2). The GENRE field gets muddled up for want of a better word!

It's as if the script requries the artist field to be written. Can anyone help me with this?

Cheers,
Pau.



comment-out only the say... parts at the artist section:

#sayregexp "(?<=<Artist>)[^<]+" "\\\\" "</track>"
#say "|"

that should work.

or simply set artist to zero at the end of the script. or almost at the end, but before the "track fix" section, if you get a strange output at track and title.
set "artist"

QUOTE (pone @ Dec 11 2011, 20:35) <{POST_SNAPBACK}>
comment-out only the say... parts at the artist section:
#sayregexp "(?<=<Artist>)[^<]+" "\\\\" "</track>"
#say "|"

that should work.

or simply set artist to zero at the end of the script. or almost at the end, but before the "track fix" section, if you get a strange output at track and title.

set "artist"<!--QuoteEnd--></div><!--QuoteEEnd-->

Thanks pone, that works great. I've also been playing around with the script and made some changes to prevent other fields being written and it's working really well

set "albumartist"
set "album artist"

Maybe you can help me with the issue I'm having with the DATE field? It's read in the script in the format MMDD whereas all my other previously tagged files are in DDMM format. Pone you helped me with this in this topic but I'm lost at how the regular expression you gave me would work otuside the main program and in a script.

Many thanks,
Paul

put this line

regexpreplace "(\d\d\d\d)-(\d\d)-(\d\d)" "$1-$3-$2"

after

findline "<dateReleased>"

at the DATE section.

or

change this

indinline "-"
sayuntil "-"
findinline "-"
sayuntil "</"

into this

findinline "-" 2
sayuntil "</"
findinline "-" -1
movechar -1
sayuntil "-"

at the DATE section

@ stevehero:
I hope you don't mind me messing up your script :wink:

To format the DATE in the format DDMM

Enter the following:

# DATE
outputto "date"
gotoline 1
findline "<dateReleased>"
findinline "<dateReleased>"
findinline "-"
findinline "-"
sayuntil "</"
gotochar 1
findline "<dateReleased>"
findinline "<dateReleased>"
findinline "-"
sayuntil "-"

Replacing:

# DATE
outputto "date"
gotoline 1
findline "<dateReleased>"
findinline "<dateReleased>"
findinline "-"
sayuntil "-"
findinline "-"
sayuntil "</"

EDIT
@pone, not one little bit :] Just seen you posted. Its a cleaner method but both things do the same @The Sheriff.

QUOTE (pone @ Dec 11 2011, 23:26) <{POST_SNAPBACK}>
put this line
regexpreplace "(\d\d\d\d)-(\d\d)-(\d\d)" "$1-$3-$2"

after

findline "<dateReleased>"

at the DATE section.

or

change this

indinline "-"
sayuntil "-"
findinline "-"
sayuntil "</"

into this

findinline "-" 2
sayuntil "</"
findinline "-" -1
movechar -1
sayuntil "-"

at the DATE section

@ stevehero:
I hope you don't mind me messing up your script :wink:

pone, you are a genius. Thanks again.

Beatport are now displaying the bpm and song Key info in the API..

Could you please add these tags into the next update of the script?

I've modified my .src files and I now get the bpm.
but I'm struggling with the song key info. (I'm new to this)

thanks

I've taken a quick look on my phone there and its seems they do have it in the API :slight_smile:. This will be included in the next update of the script very soon as its the most requested feature from you guys.

Thanks for pointing that out garves.

I've been very busy (my apologies) so those looking for a quick fix to the BPM and INITIALKEY info. Heres goes.

The INITIALKEY tag is formatted as follows:
C Minor
C♯ Major
A♭ Minor

I have tested the special character '♭' in traktor and it shows up. Any problems for now just find where it says 'replace "1" "♭"' in the code below and change the '♭' to a 'b'.

BTW Any suggestions as to how you would like this formatted please let me know. OR maybe its fine the way it is :]

Just so I can update the next version to how you guys like it

Please place whats in italics between whats in bold in the script, like so:
# _LENGTH
outputto "_length"
findline ""
findinline ">"
sayuntil "</"
say "|"

# BPM
outputto "BPM"
findline ""
findinline ">"
sayuntil "</"
say "|"

KEY

outputto "InitialKey"
findline "<trackKey>"
# LETTER	
moveline 2
findinline ">"
sayuntil "</"
# SHARP
moveline 1
replace "1" "♯"
findinline ">"
sayuntil "</"
# FLAT
moveline 1
replace "1" "♭"
findinline ">"
sayuntil "</"
# CHORD
moveline 1
replace "minor" "Minor"
replace "major" "Major"
findinline ">"
Say " "
sayuntil "</"
say "|"</i>

# GENRE
outputto "Genre"
findline "<genre"