You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The player I am using is mpv (with mpv-mpris). I discovered this issue using my own script, but I can confirm this issue using this example for the Playerctl Python bindings.
The bug is that Playerctl seems to receive / trigger signals for players which have vanished before. To find this bug, do the following:
Optional: In the example script, change the appearances of player.props.player_name to player.props.player_instance for better differing the multiple instances of mpv running. Without the change, the bug will also occur but seems even more weird.
Start the script and let it running in the background
Launch a first instance of mpv (after some seconds playing you can pause it)
Launch a second instance of mpv (same as above)
Kill the first instance, it does not work if you kill the second instance
Resume playing on the second instance (issuing the example script to log this), this can be repeated several times
The expected log (with comments referring to the steps above) of the example script should be (with the modification, pid can differ):
# Launch first instance
player is playing: mpv
# Launch second instance
player is playing: mpv.instance804148
# Exit first instance
player has exited: mpv
# Resume second instance
player is playing: mpv.instance804148
But for me it is actually (with the modification, pid can differ):
# Launch first instance
player is playing: mpv
# Launch second instance
player is playing: mpv.instance804148
# Exit first instance
player has exited: mpv
# Resume second instance
player is playing: mpv
player is playing: mpv.instance804148
(without the modification, mpv.instance804148 would also be mpv, which can be confusing)
Playerctl seems to have problems with mpv first naming its instance mpv and mpv.instancePID the second time. But the issue does not apply if both instances run simultaneously. The developer of mpv-mpris states this behaviour is following the MPRIS specification. Even playerctl instances launched after exiting the first mpv instance (but while the second one is still present) list multiple mpv instances even if only a single process is still opened:
$ playerctl --list-all
mpv.instance804148
mpv
As I do not know much about d-bus interfaces, I hope you can take a look on this issue and maybe fix it, if Playerctl does mess up with something. Thank you for your work on Playerctl.
The text was updated successfully, but these errors were encountered:
The player I am using is mpv (with mpv-mpris). I discovered this issue using my own script, but I can confirm this issue using this example for the Playerctl Python bindings.
The bug is that Playerctl seems to receive / trigger signals for players which have vanished before. To find this bug, do the following:
player.props.player_name
toplayer.props.player_instance
for better differing the multiple instances of mpv running. Without the change, the bug will also occur but seems even more weird.The expected log (with comments referring to the steps above) of the example script should be (with the modification, pid can differ):
But for me it is actually (with the modification, pid can differ):
(without the modification,
mpv.instance804148
would also bempv
, which can be confusing)Playerctl seems to have problems with mpv first naming its instance
mpv
andmpv.instancePID
the second time. But the issue does not apply if both instances run simultaneously. The developer of mpv-mpris states this behaviour is following the MPRIS specification. Even playerctl instances launched after exiting the first mpv instance (but while the second one is still present) list multiple mpv instances even if only a single process is still opened:As I do not know much about d-bus interfaces, I hope you can take a look on this issue and maybe fix it, if Playerctl does mess up with something. Thank you for your work on Playerctl.
The text was updated successfully, but these errors were encountered: