Code review comment for lp:~ertain/elementaryos/pause-media-player-script

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

> What's also strange is that, when I test this script (e.g. closing my laptop lid to send the omputer into suspension), it doesn't pick up the currently playing media player.

That's because your script runs as root, not as the "current user" of which there may be several - multiseat is still a thing, not to mention several users being logged in at the same time.

So you'd have to iterate over all the users currently logged in, drop privileges to each user and then execute your MPRIS poking magic.

review: Needs Fixing

« Back to merge proposal