Il 04/01/2024 17:11, Max Nikulin ha scritto:
On 04/01/2024 22:21, Valerio Vanni wrote:
Il 04/01/2024 15:48, Max Nikulin ha scritto:
Is it really necessary to kill kaffeine or it is enough to pause or
to stop playing? It might be possible using a D-Bus query.
[...]
If it's started normally, it's enough to stop playing
But how would you try to request it to stop?
I would play with "busctl --user", "busctl --user tree SERVICE", "busctl
--user introspect SERVICE OBJECT" to figure out if suitable methods are
available.
I never used busctl.
Now I'm looking: services are
├─/MainApplication
├─/Player
├─/Television
├─/TrackList
└─/org
└─/org/kde
└─/org/kde/kaffeine
I tried to introspect the more likely, MainApplication and Television
/MainApplication
AME TYPE SIGNATURE RESULT/VALUE
FL>
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
org.qtproject.Qt.QApplication interface - - -
.aboutQt method - - -
.autoSipEnabled method - b -
.closeAllWindows method - - -
.setAutoSipEnabled method b - -
.setStyleSheet method s - -
lines 1-17
/Television
AME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
org.freedesktop.MediaPlayer interface - - -
.DigitPressed method i - -
.ListProgramSchedule method - a(ussssib) -
.PlayChannel method s - -
.PlayLastChannel method - - -
.RemoveProgram method u - -
If it's started with "-lastchannel" no, you have to close it.
But then you have also to request it to play again.
Is there an action that releases the device? "ls -l /proc/PID/fd" to check.
What should I find here?
Ideally kaffeine should implement the Inhibit interface and should close
devices on suspend or on user session switch.
Ideally...