MiczFlor / RPi-Jukebox-RFID

A Raspberry Pi jukebox, playing local music, podcasts, web radio and streams triggered by RFID cards, web app or home automation. All plug and play via USB. GPIO scripts available.
http://phoniebox.de
MIT License
1.38k stars 397 forks source link

Is there a way of not starting the sound when a new RFID card is detected? Wait until play is pressed? #1321

Open jorgemiar opened 3 years ago

jorgemiar commented 3 years ago

When the Phoniebox detects a new card it starts playing immediately. Is there a way of just "preparing"/loading the playlist but keep it on standby? I only want it to start playing when the play button is pressed.

Do I need to edit something in file rfid_trigger_play.sh ?

jorgemiar commented 3 years ago

I managed to do it by changing playlistaddplay to playlistadd here:

https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/9119d3cea67ba1e85fef377bbc4fe1f659d723e6/scripts/rfid_trigger_play.sh#L484

I then added mpc clear for it to work properly in in playout_controls.sh before mpc load. Otherwise it seems it wasn't loading the playlist if there was already one loaded.

https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/305325d5a9c094e4c47efe6f8ec6d5d7d0fd10d1/scripts/playout_controls.sh#L874-L879

s-martin commented 3 years ago

Sounds like a useful enhancement. Do you want to write a PR, so this can be integrated in the code base?