Skip to content

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 19 May 20:58
0e1aa32

v0.10.0 — asyncio + dbus-fast rewrite

First stable release of the asyncio + dbus-fast rewrite of mpDris2, the MPRIS 2 D-Bus bridge for MPD, retargeted for odio streamer (b0bbywan/odios).

Install:

curl -fsSL https://apt.odio.love/key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/odio.gpg
echo "deb [signed-by=/usr/share/keyrings/odio.gpg] https://apt.odio.love stable main" \
    | sudo tee /etc/apt/sources.list.d/odio.list
sudo apt update
sudo apt install mpdris2

Enable (D-Bus activated — default):
The shipped systemd user unit is Type=dbus with a matching D-Bus service file, so mpDris2 auto-starts on the first MPRIS call (playerctl, a media key, a desktop applet, …). No manual enable required.

Enable eagerly (optional — run before any client asks):

systemctl --user enable --now mpDris2.service

✨ What's new

  • Async cover pipeline: 5-step resolver — MPD readpicture → filesystem regex (folder.jpg, cover.png, …) → MPD albumart → CUE/cdda fallback → XDG download cache. mutagen is no longer needed; embedded art is read straight from MPD.
  • libnotify bubbles via dbus-fast: track-change notifications speak org.freedesktop.Notifications directly, no notify2 / dbus-python round-trip. [Notify] summary / body format strings, [Notify] urgency and [Notify] timeout are honoured; [Bling] notify_paused and [Bling] cdprev still work.
  • Idle-driven refresh: a single MPD idle subscription drives the MPRIS property changes — no polling, no timers.

⚙️ Configuration

  • INI config at ~/.config/mpDris2/mpDris2.conf, with /etc/mpDris2/mpDris2.conf as fallback. Example template shipped at /usr/share/doc/mpdris2/mpdris2.conf.
  • Sections: [Connection] (host, port, password), [Library] (music_dir, cover_regex, cover_cache_dir), [Notify] (notify, urgency, timeout, format strings). [Bling] notify_paused and [Bling] cdprev are still honoured.
  • CLI overrides config: -H/--host, -p/--port, --music-dir, --config, --use-journal, --no-reconnect, -v/--verbose.

🛠️ Under the hood

  • Asyncio core: single event loop. mpd.asyncio.MPDClient from python-mpd2 drives MPD; dbus-fast exports MPRIS. No more threads + GLib MainLoop + dbus-python + mutagen.
  • GNOME MediaKeys grab dropped: modern desktops (GNOME ≥ 3.6, KDE, Sway/Hyprland with playerctld) route media keys through MPRIS2 directly. [Bling] mmkeys is now a no-op.
  • Connect-with-backoff + capability probe: the MPD client retries on startup and re-probes server commands after each reconnect so MPRIS Can* flags stay accurate.
  • Build: pyproject.toml (setuptools backend) replaces autotools; Debian package built with pybuild-plugin-pyproject. Legacy src/mpDris2.in.py removed.

🏗️ CI / Dev

  • Top-level Makefile (lint / test / deb / sync-deb / i18n-extract / i18n-compile) shared by local dev and the GitHub workflow.
  • ruff + mypy + pytest (with pytest-asyncio) gating PRs.
  • .deb built on debian:trixie, attached to this release, and dispatched to b0bbywan/odio-apt-repo so apt.odio.love picks it up.

Full changelog: v0.9.3...v0.10.0

What's Changed

  • Bootstrap pyproject + asyncio package skeleton by @b0bbywan in #3