Mopidy extension for playing music from a music collection managed via Beets
Project description
mopidy-beets
Mopidy extension for playing music from a music collection managed via Beets. This extension uses the Beets plugin "web".
Installation
Install by running:
python3 -m pip install mopidy-beets
See https://mopidy.com/ext/beets/ for alternative installation methods.
Configuration
-
Setup the Beets plugin "web".
-
Tell Mopidy where to find the Beets web interface by adding the following to your
mopidy.conf:[beets] hostname = 127.0.0.1 port = 8337
-
Restart Mopidy.
The Beets library is now accessible in the "browser" section of your Mopidy client. Additional searches in Mopidy return results from your Beets library.
Proxy configuration for OGG files (optional)
In case you use a Beets version older than 1.6.1, you may need to configure
an HTTP reverse-proxy server in front of the Beets web plugin (not Mopidy)
because it does not handle HTTP "Range" requests properly <https://github.com/beetbox/beets/pull/5057>_.
If you don't apply this workaround, Mopidy may not be able to stream/play large audio files and/or does not allow you to seek. The is the case for OGG files in particular.
The following Nginx configuration snippet is sufficient:
server {
listen 127.0.0.1:8338;
root /usr/share/beets/beetsplug/web;
server_name beets.local;
location / {
proxy_pass http://localhost:8337;
# this statement forces Nginx to emulate "Range" responses
proxy_force_ranges on;
# Hide Range header from beets/flask, preventing range handling
proxy_set_header "Range" "";
}
}
Now you should change the Mopidy configuration accordingly to point to the Nginx port above instead of the Beets port. Afterwards Mopidy will be able to play file formats that require seeking.
Usage
-
Run
beet webto start the Beets web interface. -
Start Mopidy and access your Beets library via any Mopidy client:
- Browse your collection by album
- Search for tracks or albums
- Let the music play!
Project resources
Development
Set up development environment
Clone the repo using, e.g. using gh:
gh repo clone mopidy/mopidy-beets
Enter the directory, and install dependencies using uv:
cd mopidy-beets/
uv sync
Running tests
To run all tests and linters in isolated environments, use tox:
tox
To only run tests, use pytest:
pytest
To format the code, use ruff:
ruff format .
To check for lints with ruff, run:
ruff check .
To check for type errors, use pyright:
pyright .
Making a release
To make a release to PyPI, go to the project's GitHub releases page and click the "Draft a new release" button.
In the "choose a tag" dropdown, select the tag you want to release or create a
new tag, e.g. v0.1.0. Add a title, e.g. v0.1.0, and a description of the changes.
Decide if the release is a pre-release (alpha, beta, or release candidate) or should be marked as the latest release, and click "Publish release".
Once the release is created, the release.yml GitHub Action will automatically
build and publish the release to
PyPI.
Credits
- Original author: Janez Troha
- Current maintainer: Lars Kruse
- Contributors
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mopidy_beets-5.0.0a3.tar.gz.
File metadata
- Download URL: mopidy_beets-5.0.0a3.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c020666b8619f328bfc8c579dbcc67fba899db20008d3d8f05105e151e40ee8
|
|
| MD5 |
e9b25ca9dfc08dab8c9e0f644a89fe22
|
|
| BLAKE2b-256 |
8302779840486298230f468ad026a3958d3f29024cd65d6cf94d521f403f0f40
|
Provenance
The following attestation bundles were made for mopidy_beets-5.0.0a3.tar.gz:
Publisher:
release.yml on mopidy/mopidy-beets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mopidy_beets-5.0.0a3.tar.gz -
Subject digest:
3c020666b8619f328bfc8c579dbcc67fba899db20008d3d8f05105e151e40ee8 - Sigstore transparency entry: 725449926
- Sigstore integration time:
-
Permalink:
mopidy/mopidy-beets@1a4a7317d8b4bda27d8b1dc108055a522cba23fd -
Branch / Tag:
refs/tags/v5.0.0a3 - Owner: https://github.com/mopidy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1a4a7317d8b4bda27d8b1dc108055a522cba23fd -
Trigger Event:
release
-
Statement type:
File details
Details for the file mopidy_beets-5.0.0a3-py3-none-any.whl.
File metadata
- Download URL: mopidy_beets-5.0.0a3-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e543dc86c59d0506de5dfc11014b6bb1823c5d7829ace5b6895c90f6e0a35ada
|
|
| MD5 |
f7ce494248e230e0ff807696410ef0ba
|
|
| BLAKE2b-256 |
2822a95b99dbf5d887a5d0523788c4793d0547f1be89e2adc73c2ad21d0524df
|
Provenance
The following attestation bundles were made for mopidy_beets-5.0.0a3-py3-none-any.whl:
Publisher:
release.yml on mopidy/mopidy-beets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mopidy_beets-5.0.0a3-py3-none-any.whl -
Subject digest:
e543dc86c59d0506de5dfc11014b6bb1823c5d7829ace5b6895c90f6e0a35ada - Sigstore transparency entry: 725449932
- Sigstore integration time:
-
Permalink:
mopidy/mopidy-beets@1a4a7317d8b4bda27d8b1dc108055a522cba23fd -
Branch / Tag:
refs/tags/v5.0.0a3 - Owner: https://github.com/mopidy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1a4a7317d8b4bda27d8b1dc108055a522cba23fd -
Trigger Event:
release
-
Statement type: