Script to play a radio if nothing else is playing in mpc?

Raspberry Pi related support

Script to play a radio if nothing else is playing in mpc?

Postby SuttonWillow » 15 Mar 2021, 08:47

I'm trying to achieve this: when I boot up, I'd like to start playing this station I have already added that to `Webradio/MyNoise-PureNature.pls`. Once it's playing, if I start playing some music it should obviously stop, but here is the tricky part, when I stop the music and nothing else is playing, I'd like to start playing that radio again, so it becomes some sort of background sound whenever system is up and nothing is playing. Now, I guess it should be pretty easy to add it at startup through systemd,omegle xender but I have no idea how could I create a bash script with a conditional "if nothing else is playing in mpc, then play .pls". I think it'd be a nice thing to have, but no idea how to go about it. Anyone knows how to create such script.
SuttonWillow
 
Posts: 1
Joined: 15 Mar 2021, 08:45

support RuneAudio Donate with PayPal

Return to Raspberry Pi

Who is online

Users browsing this forum: Majestic-12 [Bot] and 3 guests