Skip to main content

Mopidy extension for SomaFM

Project description

mopidy-somafm

Latest PyPI version CI build status Test coverage

Mopidy extension for SomaFM

Installation

Install by running:

python3 -m pip install mopidy-somafm

See https://mopidy.com/ext/somafm/ for alternative installation methods.

Configuration

Before starting Mopidy, you must add configuration for mopidy-somafm to your Mopidy configuration file:

[somafm]
encoding = aac
quality = highest
  • encoding must be either aac, mp3 or aacp
  • quality must be one of highest, 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 = true

Project resources

Development

Set up development environment

Clone the repo using, e.g. using gh:

gh repo clone AlexandrePTJ/mopidy-somafm

Enter the directory, and install dependencies using uv:

cd mopidy-somafm/
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 .

Setup before first release

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 in release.yml)

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mopidy_somafm-2.1.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mopidy_somafm-2.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file mopidy_somafm-2.1.0.tar.gz.

File metadata

  • Download URL: mopidy_somafm-2.1.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mopidy_somafm-2.1.0.tar.gz
Algorithm Hash digest
SHA256 77bcabde36d9dbc4a3e48d3a8b7e31bf166d5e7ca75b97faf887a6e6543a119e
MD5 7a3ee4b8c9e3251b610e535c46666c68
BLAKE2b-256 c2f010f14a661cce539d0d46611b2c283e38530591c2a811eab7fc954fb9e9bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for mopidy_somafm-2.1.0.tar.gz:

Publisher: release.yml on AlexandrePTJ/mopidy-somafm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mopidy_somafm-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: mopidy_somafm-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mopidy_somafm-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84f4864c8050c30c4af2968585cafcf97290a40b1cfd9cc14b4d0e4582754fe0
MD5 8d74a33eee07ecc7b303ea32abf98ead
BLAKE2b-256 7a800010a1403ad5f39e649ed773c3f2cf718d907041b50613f409739702ff2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mopidy_somafm-2.1.0-py3-none-any.whl:

Publisher: release.yml on AlexandrePTJ/mopidy-somafm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page