I have Spotify on the TV together with plex. Naturally plex covers spotify, even if Spotify is the active application. How can I hide plex when clicking on the spotify icon?
I tried the following which only works when Spotify is not running and I start it.
entered these commands in the terminal:
cd /Applications/Spotify.app/Contents/MacOS
sudo mv Spotify SpotifyX
sudo touch Spotify
sudo chmod uog+x Spotify
then added this to “Spotify”
<br />
#!/usr/bin/env python<br />
import os, sys<br />
<br />
os.spawnvp(os.P_NOWAIT, '/Applications/Spotify.app/Contents/MacOS/SpotifyX', sys.argv)<br />
<br />
cmd = "osascript -e 'tell application \"System Events\" to set visible of process \"Plex\" to false'"<br />
os.system(cmd)<br />
So... any thoughts on how i can accomplish this?