Project description
Plugin for beets to replace stock beatport plugin and use Beatport API v4 as an
autotagger source.
As Beatport had killed their API v3, the stock beatport plugin does not work anymore. It is also currently not possible to request the access to the API “normal” way (by using your client credentials or API token generated by Beatport), so I have found workaround that uses public API client id used for Beatport docs frontend and updated the code to use the new specification.
For more info, see the discussion on this issue: https://github.com/beetbox/beets/issues/3862
I have also opened a pull request in the official beets repository (https://github.com/beetbox/beets/pull/4477), so if it gets merged, I am probably going to take down this plugin.
Installation
Install this plugin with
$ pip install beets-beatport4
and add beatport4 to the plugins list in your beets config file.
Beatport Authorization
There are two ways of acquiring user access token to the Beatport v4 API using
this plugin.
Method 1: username and password
This method is fully automatic and relies on holding your Beatport username
and password inside your beets config file.
It will authorize to the Beatport API using authorization_code grant type
and client_id provided by beatport for the sake of their swagger-ui
frontend in which you can test their API: https://api.beatport.com/v4/docs/
Steps:
Add beatport4 plugin to your beets/config.yaml plugins list
Add below configuration and fill your credentials
beatport4:
username: <YOUR_BEATPORT_USERNAME>
password: <YOUR_BEATPORT_PASSWORD>
Method 2. copy token from the browser
You will probably want to use this method if you don’t want to store your
credentials unencrypted within the config file. Also, it will be helpful if
for any reason something goes wrong during the username/password authorization
process.
This is also a fallback method if you provide wrong credentials in the config.
Steps:
Add beatport4 plugin to your beets/config.yaml plugins list
When the first import with plugin enabled happens, you will be prompted to paste the access token JSON
Visit https://api.beatport.com/v4/docs/
Open Network tab in your browser and start capturing the traffic
Login with your Beatport account
Search for the following request: https://api.beatport.com/v4/auth/o/token/
Copy the response (whole JSON structure)
Paste it to the terminal (or beatport_token.json file next to your beets/config.yaml - you can check the path by running beet config --paths command)
If the token expires, you will be prompted again and required to repeat above steps
Configuration
beatport4:
username: <YOUR_BEATPORT_USERNAME>
password: <YOUR_BEATPORT_PASSWORD>
Apart from the above, plugin should work exactly the same way as the stock one, so please refer to the official documentation
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution