[PR #1596] Add MPRIS support #1448

Open
opened 2026-02-27 20:02:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/1596
Author: @paulfariello
Created: 9/23/2025
Status: 🔄 Open

Base: devHead: mpris


📝 Commits (10+)

  • 8fe221e Allow cloning SPIRC
  • d7951f1 add release date to AudioItem
  • ae47002 add Spirc.seek_offset command
  • 8b78253 add initial MPRIS support using zbus
  • 89f26cd feat(mpris): serve identity based on configured name
  • e49c287 feat(mpris): Add set_volume handler
  • c54b260 feat(mpris): Retry with pid specific name on NameTaken error
  • 019fa4c feat(player): Send current state of player for all new player listeners
  • 4a26063 feat(mpris): Notify when volume changed
  • fc17df4 fix(mpris): Remove done todo

📊 Changes

9 files changed (+1658 additions, -35 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 Cargo.lock (+24 -21)
📝 Cargo.toml (+8 -1)
📝 connect/src/spirc.rs (+29 -0)
📝 metadata/src/audio/item.rs (+4 -0)
📝 playback/src/player.rs (+60 -6)
📝 src/main.rs (+24 -1)
src/mpris_event_handler.rs (+1489 -0)
📝 src/player_event_handler.rs (+16 -6)

📄 Description

Taking back on @wisp3rwind work for adding MPRIS support #1341.

  • Rebased on recent dev branch
  • ensure cargo fmt and cargo clippy passes on each commit
  • fix a few todos
  • send signal when position changed
  • return error when MPRIS command are done in wrong context or internal fails
  • handle position
  • handle identity
  • choose biggest art url
  • ensure metadata are always up to date or at least not invalid
  • notify on various property change

Not sure about:

  • Sending current state of player for all new listener (59767ce)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/1596 **Author:** [@paulfariello](https://github.com/paulfariello) **Created:** 9/23/2025 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `mpris` --- ### 📝 Commits (10+) - [`8fe221e`](https://github.com/librespot-org/librespot/commit/8fe221ecdcaee18abb992bf561d8e50798e46d8c) Allow cloning SPIRC - [`d7951f1`](https://github.com/librespot-org/librespot/commit/d7951f15884dab43cdab9de0633dbccfd6f42746) add release date to AudioItem - [`ae47002`](https://github.com/librespot-org/librespot/commit/ae470025589c0718c62a303708e51859f5b8a508) add Spirc.seek_offset command - [`8b78253`](https://github.com/librespot-org/librespot/commit/8b7825319f7139ebc78d206541233c94ea0dca4c) add initial MPRIS support using zbus - [`89f26cd`](https://github.com/librespot-org/librespot/commit/89f26cde3c71afb4610936ba40587a6c76761a0b) feat(mpris): serve identity based on configured name - [`e49c287`](https://github.com/librespot-org/librespot/commit/e49c2877056f008d4ee227d1a3942eaa862ad27e) feat(mpris): Add set_volume handler - [`c54b260`](https://github.com/librespot-org/librespot/commit/c54b260b985a3865749ed1a0b208ee9b43a9893b) feat(mpris): Retry with pid specific name on NameTaken error - [`019fa4c`](https://github.com/librespot-org/librespot/commit/019fa4ccb65e410cc1ba165aeedf18e9494ba37f) feat(player): Send current state of player for all new player listeners - [`4a26063`](https://github.com/librespot-org/librespot/commit/4a26063eec8d634d2249e56bf7ef4ccb264ccb97) feat(mpris): Notify when volume changed - [`fc17df4`](https://github.com/librespot-org/librespot/commit/fc17df40c02a4b1bf91d5bae56054cd978522f6d) fix(mpris): Remove done todo ### 📊 Changes **9 files changed** (+1658 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `Cargo.lock` (+24 -21) 📝 `Cargo.toml` (+8 -1) 📝 `connect/src/spirc.rs` (+29 -0) 📝 `metadata/src/audio/item.rs` (+4 -0) 📝 `playback/src/player.rs` (+60 -6) 📝 `src/main.rs` (+24 -1) ➕ `src/mpris_event_handler.rs` (+1489 -0) 📝 `src/player_event_handler.rs` (+16 -6) </details> ### 📄 Description Taking back on @wisp3rwind work for adding MPRIS support #1341. - Rebased on recent dev branch - ensure cargo fmt and cargo clippy passes on each commit - fix a few todos - send signal when position changed - return error when MPRIS command are done in wrong context or internal fails - handle position - handle identity - choose biggest art url - ensure metadata are always up to date or at least not invalid - notify on various property change Not sure about: - Sending current state of player for all new listener (59767ce) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#1448
No description provided.