Serve multiple beets APIs on the same host/port
Project description
beets-webrouter
A beets plugin to serve multiple web apps on the same server/host/port with one command.
This allows serve the beets web UI, a Subsonic API as well as the generated M3U playlists with a single beets webrouter
command.
Installation
python3 -m pip install beets-webrouter
To install the plugins that are used by the example configuration below, run:
python3 -m pip install beetstream beets-webm3u
Configuration
Enable the plugin and add a webrouter
section to your beets config.yaml
as follows:
plugins:
- webrouter
- web
- webm3u
- beetstream
- aura
- smartplaylist
webrouter:
host: 0.0.0.0
port: 8337
routes:
/:
plugin: web
/favicon.ico:
plugin: webrouter.favicon
/subsonic:
plugin: beetstream
config:
never_transcode: true
/aura:
plugin: aura
blueprint: aura_bp
/m3u:
plugin: webm3u
aura:
page_limit: 100
webm3u:
host: 0.0.0.0
port: 8339
playlist_dir: /data/playlists
Usage
Once the webrouter
plugin is enabled within your beets configuration, you can run it as follows:
beet webrouter
You browse the server at http://localhost:8337
.
CLI
Usage: beet webrouter [options]
Development
Run the unit tests (containerized):
make test
Run the e2e tests (containerized):
make test-e2e
To test your plugin changes manually, you can run a shell within a beets docker container as follows:
make beets-sh
A temporary beets library is written to ./data
.
It can be removed by calling make clean-data
.
To just start the server, run:
make beets-webrouter
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for beets_webrouter-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a031be40db307997a7daa3ca223ef7c84865f89a668aa1a07e021a5b507cb44 |
|
MD5 | 016c14b627711a291562ce1f0443b02a |
|
BLAKE2b-256 | 8bb6798c4c5576e06da14376d4d90df434894bdbfebcb7cf71d631b2af716f59 |