eonpatapon / mpDris2

MPRIS V2.1 support for mpd
GNU General Public License v3.0
214 stars 46 forks source link

Enabling mpDris2 service breaks mpd socket activation functionality #160

Open topas-rec opened 1 year ago

topas-rec commented 1 year ago

I use mpd occasionally and start the mpd service only on demand by using its socket. (Explained here) That works pretty well.

However, when the mpDris2 service is enabled on boot mpd is started on every boot, no matter if mpd is running or not. The reason is that mpDris2 starts it by connecting to its socket. This can be tested by

  1. Stopping mpDris2 service
  2. Disabling mpd service
  3. Stopping mpd service
  4. Activating mpd socket
  5. Starting mpd socket (Checking if mpd is still not started)
  6. Starting mpDris2 (Checking mpd service status: It should be activated if the issue is present)

Is it possible to work around this and keep the mpd socket activation intact by checking if mpd service is active when mpDris2 starts before actually connecting to the socket?

Best regards Tobias