Pirate Radio - How to make changes

Hello fellows.

I’ve just assembled my Pirate Radio and it’s working fine.
But now I want to get into it and make changes.
So do anyone now where the script / file is, that is handling the functions between phatbeat and vlcd?

I did find ~/Pimoroni/phatbeat/projects/vlc-radio/phatbeatd/usr/bin/phatbeatd
and did some changes but no change at all.
I.e i dont want it to pause the stream, but stop the stream when button is pushed.
So i changed:

@phatbeat.on(phatbeat.BTN_PLAYPAUSE)
def pb_play_pause(pin):
log(vlc.communicate(“pause”))
time.sleep(0.1)
phatbeat.clear()
phatbeat.show()

to:

@phatbeat.on(phatbeat.BTN_PLAYPAUSE)
def pb_play_pause(pin):
log(vlc.communicate(“stop”))
time.sleep(0.1)
phatbeat.clear()
phatbeat.show()

But it did not do any change to the behavior!?

Any help is appreciated.

Going by what I was told here, Use a media keyboard with your pHat Beat, can it be done? thats the correct file to edit. Although I was cautioned not to edit it. ;) Or at least to be very careful what I changed.
The commands are listed here, Use a media keyboard with your pHat Beat, can it be done? stop looks to be valid.
What doesn’t or does happen now?

Hello alphanumeric.

After edit and reboot:
it won’t stop the stream. It simply makes it pasue, so when pressed play again it starts from pause. I will use it as internet radio, so i want it to stop the stream and then starts again when pressed otherwise i’ll ends up with radio news and programs that are several hours old.

One option is to just turn the volume al the way down. Then back up when you want to listen to it again. I do that sometimes when I’m just taking a short break and don’t want to have to boot it up again in an hour or so.

Yes i do the same.
But then i don’t get the fun of changing the Python code.
The only reason i biught this was to fooling around with the code… :-)

Get another Pi to play with. ;)
I have two 3B+'s, two 3B’s, a 3A+, two A+'s and eight or more (lost count of how many) Zero W’s.
Some have Sense hats on them, some have explorer pHats. I learned a lot coding for them.
My Pirate Radio install is likely the only one I haven’t tweaked the code on. I did have a go at getting a remote control going on it but that didn’t end up working very well and I abandoned it. It’s pretty well stock software wise now. My only real modification was to add my own mini arcade buttons for the play pause etc. Mines in a wooden enclosure.