Mopidy extension for SomaFM
Install by running:
python3 -m pip install mopidy-somafmSee https://mopidy.com/ext/somafm/ for alternative installation methods.
Before starting Mopidy, you must add configuration for mopidy-somafm to your Mopidy configuration file:
[somafm]
encoding = aac
quality = highestencodingmust be eitheraac,mp3oraacpqualitymust be one ofhighest,fast,slow,firewall
If the preferred quality is not available for a channel, the extension will fallback
to fast. And afterwards if the preferred encoding is not available for that
quality, it will fallback to using mp3.
It seems that all channels support the combination fast + mp3
You can also choose to use the channel DJ as the reported track artist (default behavior)::
[somafm]
dj_as_artist = trueClone the repo using, e.g. using gh:
gh repo clone AlexandrePTJ/mopidy-somafmEnter the directory, and install dependencies using uv:
cd mopidy-somafm/
uv syncTo run all tests and linters in isolated environments, use tox:
toxTo only run tests, use pytest:
pytestTo format the code, use ruff:
ruff format .To check for lints with ruff, run:
ruff check .To check for type errors, use pyright:
pyright .Before the first release, you must enable trusted publishing on
PyPI
so that the release.yml GitHub Action can create the PyPI project and publish
releases to PyPI.
When following the instructions linked above, use the following values in the form at PyPI:
- Publisher: GitHub
- PyPI project name:
mopidy-somafm - Owner:
AlexandrePTJ - Repository name:
mopidy-somafm - Workflow name:
release.yml - Environment name:
pypi(must match environment name inrelease.yml)
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.
- Original author: Alexandre Petitjean
- Current maintainer: Alexandre Petitjean
- Contributors