Plugin for beets (http://beets.io) to replace stock beatport plugin which is not yet compatible with Beatport API v4.
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.
Fetching and embedding an art
Additionally, this plugin has implemented separate art fetching and embedding. Unlike fetchart plugin, it handles both singletons, but it will not work if you choose candidate source other than Beatport. Also, it does not require enabling fetchart or embedart plugins, as it uses beets.art module shipped with the core library.
Under the hood, it uses image URL for the track’s release, exposed by the Beatport API.
You can enable this feature via configuration (it is disabled by default):
beatport4:
art: yes
By default, if a track already contains an art, it will not be overwritten. Again, you can force such behaviour via configuration:
beatport4:
art: yes
art_overwrite: yes
Image size
Original images from Beatport might have big resolution and size, but thanks to Beatport’s dynamic image URIs, it is possible to fetch image already resized by Beatport backend, saving the bandwidth and resources on resizing images locally. To specify the dynamic width and height, just pass it via configuration:
beatport4:
art: yes
art_width: 250 # don't specify or 0 to disable
art_height: 250 # don't specify or 0 to disable
if you specify just one dimension, the other will be set to the same value, so the aspect ratio is 1:1
if you don’t specify any dimension, original art will be downloaded
if you specify both dimensions, they will be used in the dynamic URI, but they usually (always?) return images in 1:1 aspect ratio using lower dimension anyway
Plugin configuration
beatport4:
art: no
art_overwrite: no
art_width: <WIDTH_PX>
art_height: <HEIGHT_PX>
username: <YOUR_BEATPORT_USERNAME>
password: <YOUR_BEATPORT_PASSWORD>
client_id: <BEATPORT_API_CLIENT_ID> # optional, you can set it, but it should be scrapped automatically from the docs
Apart from the above, plugin should work exactly the same way as the stock one, so please refer to the official documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file beets-beatport4-0.3.4.tar.gz
.
File metadata
- Download URL: beets-beatport4-0.3.4.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82cb784efe1c2d51ed0b05fce5e1314f5719070d45a4dbfb5e339ed5eaa56bf1 |
|
MD5 | 85ebcf066ce0d7c7599d3168b0b3d8ca |
|
BLAKE2b-256 | d37f50caf9168e89009811afdda92eca5a2faba1a2b475b0d051300c099c3228 |
File details
Details for the file beets_beatport4-0.3.4-py3-none-any.whl
.
File metadata
- Download URL: beets_beatport4-0.3.4-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 261839f49378ae2064dec2fa1ac18e506f94cc744534a1444eb3b0dc32ddadb0 |
|
MD5 | fdcf5a6e2ab9930837cb58f4a06e05c3 |
|
BLAKE2b-256 | 40c059b015b995fcf45e1316a6f6fbcb4c5cc6b9adf08b3242f83bc1789aedfa |