geigi / cozy

🎧 Listen to audio books 📚 on Linux
https://cozy.sh
GNU General Public License v3.0
1.09k stars 83 forks source link

MPRIS volume change isn't reflected on volume slider #817

Open rdbende opened 7 months ago

rdbende commented 7 months ago

Bug/Feature description

When changing application volume through MPRIS, the current volume isn't updated on the volume slider, and opening and moving it manually makes the volume jump back to where the slider thinks it is.

System Information

rdbende commented 7 months ago

Turns out, it is handled by the GStreamer player bin itself, not the MPRIS interface.

However, due to the many abstraction layers, it's quite hard to fix it, because we either have to use an ugly workaround with private properties (self._player._gst_player._player.connect("notify::volume", self._on_volume)), or have to propagate the notify::volume signal through gst_player.GstPlayer -> player.Player -> playback_control_view_model.PlaybackControlViewModel -> media_controller.MediaController. My feeling is that there are too much abstraction layers in this stack, and should be refactored.