Skip to content

mpris_controller: replace "mpris_player" with "mpris_server"

Arnaud Ferraris requested to merge a-wai/amberol:replace-mpris into main

The mpris-player crate has been deprecated upstream in July 2022. The best alternative currently is mpris-server, which is actively maintained, published on crates.io and has an API very similar to the one from mpris-player.

The main differences are the following:

  • the Player object, once created, must be initialized and run in an async block, requiring a new task to be spawned
  • most setters are async as well, with the same side effect (spawn new tasks)

This change was supposed to be a straightforward port, partly inspired (for the async operations) by Mousai, but it actually adds the following:

  • proper emission of the Seeked MPRIS signal when the track position is changed in a non-linear way
  • fix the behaviour of the Seek command received from MPRIS clients

Supersedes !116 (closed)

Edited by Arnaud Ferraris

Merge request reports