I'm taking a stab at some plug-in dev, and I'd like to know the code to use to launch an app and listen for it quitting to reopen plex.
I'm using
subprocess.call(('open', gamePath))
to open a game, where gamePath is the path to a rom file. This works to launch it, but there are two problems.
1) Plex is still running in the background
2) Plex still has control of the Xbox 360 controller
So firstly, I'd like to have plex exit and listen for the emulator application to Quit and automatically relaunch, or I'd like it to at least give up control of the controller temporarily.
Are either of these things the right solution here? Other ideas?
This won’t be possible from a plug-in (at least not easily). Plug-ins are for the media server, not Plex itself. Plex accesses plug-ins by connecting to a media server - you could theoretically serve multiple copies of Plex from a single plug-in instance. Plug-ins have very little control of Plex beyond sending media lists & triggering playback.