How does is_app_running work ? AquaTouch Spotify detection

Hey there, I am using AquaTouch and if it is running I can not get spotify to quit. This is doe to the Streamdeck Spotify extension having a similar process name, so the is_app_running will fail to detect that the actual spotify is not running.

I know of this issue as I fixed it myself on the simple-bar übersicht widget, and if I quit streamdeck first, then spotify btt will not reopen spotify anymore.

The question now is: How is is_app_running implemented and can it be made more precise ?

You can check my specific issue and PR here:

I solved this by matching the spotify helper instead of the spotify process itself there... Maybe somebody has some insight on how this can be fixed ?

is_app_running has two modes:

  • if a string that contains dots is passed (e.g., it will assume that this is a bundle identifier and will check whether any app with that exact bundle identifier is running

  • if a string without dots is passed (e.g. Spotify), it will try to find that exact process in the process list (the one you see in Activity Monitor).

So it is already doing an exact match in both cases.

Maybe this is caused by something else?

Ok, great, thanks for the info and quick response :slight_smile:

The problem is that the process name is exactly the same....
I guess that is something for aquatouch development then (eventually moving the check to the helper) or I could try to find a way to change the process name in the streamdeck integration...

Screen Shot 2021-10-17 at 21.31.52

The other solution would be to switch to a third party spotify plugin like the one from BarRaider's Repo

I will test this tomorrow :slight_smile:

Yep, changing aquatouch to look for the bundle identifier (com.spotify.client) instead of the process name would help.

Yes that sounds about right, unfortunatly BarRaiders Plugin is windows only...

For now I have fixed the problem for myself this way:

  1. Navigate to Streamdeck Plugins folder
  2. find com.elgato.spotify.sdPlugin folder
  3. Rename the binary from Spotify to SpotifySD
  4. Open manifest.json in the same folder and change the "CodePath" property from "Spotify" to "SpotifySD"
  5. Restart Streamdeck App

Hope this helps someone in the future :slight_smile:

Greetings and thanks again,

1 Like