I've got a flow set up so that if music is playing, it stores a variable saying so, and then pauses it. A second flow will see if that variable is true and then simulate a press play to resume playing music later.
This works perfectly fine so I can start and stop music if I'm listening but only if I'm listening. The problem is if I have Google Musc open AND PocketCasts open. What ususally happens is I'll be Playing Pocketcasts, it pauses, and then when I resume, Google music catches the Play event instead of Pocketcasts.
The only way I can imagine around this is to do something like 'If Pocketcasts is playing, set Pockcasts=1, If Google music is playing, set GoogleMusic=1', and then on the 'Play' flow have it press a play button specific to whichever is set to 1.
Is there a way to accomplish this, or a more elegant solution?
Pause music and store app as a variable?
Moderator: Martin
Re: Pause music and store app as a variable?
Just wanted to follow up for those interested. I was unable to solve this solely inside of automagic, however I did find a plugin called Media Utilities that allows a smart pause and smart play which does its best to determine what app is/was playing and pause/play it accordingly. This has worked PERFECTLY so far!