Pause music and store app as a variable?

Post your questions and help other users.

Moderator: Martin

Post Reply
Ghlave
Posts: 28
Joined: 06 Aug 2013 18:06

Pause music and store app as a variable?

Post by Ghlave » 12 Jan 2014 00:07

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?

Ghlave
Posts: 28
Joined: 06 Aug 2013 18:06

Re: Pause music and store app as a variable?

Post by Ghlave » 12 Jan 2014 14:50

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!

Post Reply