Permission/Help to use API with mp3tag application

421 views
Skip to first unread message

Stephen Lambert

unread,
Sep 6, 2013, 5:18:21 PM9/6/13
to beatpo...@googlegroups.com

I'm the developer of a bunch of scripts for mp3tag which gather information from the API release and track pages and tags mp3s based on that information. This app is free and is probably the leading application for tagging mp3 files but since the change of your API service the scripts no longer work.

(See forum post: http://forums.mp3tag.de/index.php?showtopic=14479&st=0) See attached screenshot of typical tag values of release and tracks.

I would greatly appreciate any help in this matter. Maybe you could provide mp3tag with special access to your API? I've emailed support about this but all they could do it point me to this forum. I do hope I can get an answer, afterall beatport recommend this application here https://knowledgebase.beatport.com/kb/article/000081.

Basically, I want to know how to implement the generated key (My API key: xxxxxx5b33c49107f5f7xxxxxx30616ceexxxxxx) into a url to allow access to the new API release page: https://oauth-api.beatport.com/catalog/3/releases?id=

The old line of code which worked before (code I need revised for new API hightlighted red)
---------------------------------------------------------------------------------------------------------------------------------------------
[Name]=at beatport.com [v3.1 by stevehero™] (◣_◢)
[BasedOn]=http://api.beatport.com
[IndexUrl]=http://api.beatport.com/catalog/search?v=2.0&perPage=50&format=json&facets[]=fieldType:release&query=%s
[AlbumUrl]=http://api.beatport.com/catalog/3/releases/detail?v=1.0&format=json&id=
[WordSeperator]=+
[IndexFormat]=%_url%|%_preview%|%Exclusive%|%Cover [500px]%|%Released%|%Release%|%Artist/s%|%Category%|%Catalog #%|%Label%|%Description%
[SearchBy]=[ (album)artist + release for RELEASE ]$trim($trim($repl($regexp($regexp($regexp($regexp($regexp($if2(%albumartist%,$if2(%albumartist%,$if2(%album artist%,$if2(%band%,$if2(%albumartist%,$if2(%artist%,$if2(%artist%,%discogs_artist_name%))))))),(?i)^(va|various artists|v\.a\.)$,various),(?i)the,),(?i)''s( |$),$1),'(?i)[^\w]+(featuring|feat|ft|presents|pres|and|vs|w/|\+|/|&|www[^\s]+|[^\w\s])\.*', ),'\s+', ),',',)) $trim($regexp($regexp($regexp(%album%,'\b-\b|_', ),'(?i)\[.*\]|cd\s*\d*|[^\s]+.com|\bep\b|feat\.|ft\.|\bom\b|\boriginal\b|\bclub\b|\bmix\b|\bremix\b|\bthe\b|vinyl|web|www[^\s]+|[^\w\s]',),'\s+', )))

---------------------------------------------------------------------------------------------------------------------------------------------
[BasedOn]=http://api.beatport.com
will need to be changed to
[BasedOn]=https://oauth-api.beatport.com
---------------------------------------------------------------------------------------------------------------------------------------------
But that's not the problem here ;]

Thanks out there to anyone who can help in this matter.

Stephen


stevehero all info.jpg

Julien Mahin

unread,
Sep 7, 2013, 2:38:29 PM9/7/13
to beatpo...@googlegroups.com

The only solution I can think of is the following:
On a server (lets call it MYSERVER), call the new Beatport API with the tokens and so on, to get the json string.
And make this json string available as the old fashionned way.
So the mp3tag plugin would call a url on MYSERVER. MYSERVER would contact the Beatport servers with the tokens, and will give the result to mp3tag.

I'll try this for myself, but I'm not sure how it is scalable. However, I don't think Beatport would be ok with this way of doing things... They might block the app at some point, or ratelimit limit the calls and so on.

If you want to give a try to this solution, I'm ready to help you, as I'm a user of your great plugin and it makes my life so easy :)

Stephen Lambert

unread,
Sep 16, 2013, 5:03:35 PM9/16/13
to beatpo...@googlegroups.com
Hi Julien, so sorry I didn't get back to you earlier, been busy busy busy. It's been a real headache with this new API but from beatports point of view I can see why they implemented it.

I received this email from Matthias over at BP about what I could do after a few private emails back and forth. I think what you're talking about is much the same as what Matthias is:

    "I looked at the mp3tag web sources developer documentation. I understand why your scripts worked before and why I think you're out of luck for a while.
    "Using these description files, you can import tag data from theoretically every web site which displays artist/album information via HTML..."
    This is nothing more than a list of commands for locating and scraping data from public websites. This is not API consumption. If you consumed our API, you wouldn't need to do ANY pattern matching or scraping -- you have all the data you want on each request.
    Here are the issues:

        (Assumption) The mp3tag infrastructure only supports fetching un-authenticated data from public websites using curl, wget, or similar.
        (Assumption) The mp3tag team is not planning on adding oauth-driven API support in the near future.

    The only workaround I can see is to start your own web service which acts as a pass-through, dig?

        Create a domain name -- mp3tagapis.de (or whatever)
        Make a website in a popular programming language (PHP, Python, Ruby, etc.)
        Create endpoints to mimic Beatport's API in alignment with your scripts
            mp3tagapis.de/beatport/release/?id=12345
            mp3tagapis.de/beatport/track/?id=12345
        These endpoints will just call the Beatport API using OAuth, then replay the response back to mp3tag
        Maybe instead of a replay, you generate a custom response to make your scripts easier to write?
        Update your scripts to point your IndexURL to mp3tagapis.de instead of Beatport

    This solution would allow mp3tag to make unauthenticated calls to your new site, which would then talk to Beatport over OAuth.
    I don't see an alternative based on what I can read from mp3tag.de.
"

I would be for ever in your gratitude if you could help.

Julien Mahin

unread,
Sep 18, 2013, 7:49:16 AM9/18/13
to beatpo...@googlegroups.com
Yes, this is exactly what I suggested.

However, I'm not sure I can help as Beatport has set the API to "partners only" and is removing access to some people...

Maybe when they tell us what's going on, I will take the time to help you. Until then, I'm done with Beatport.
If you contact them and they give you the access to the API, then this is ok and I will help you :)




Le vendredi 6 septembre 2013 23:18:21 UTC+2, Stephen Lambert a écrit :
Reply all
Reply to author
Forward
0 new messages