Librespot "onevent" option error
physispc opened this issue · comments
Compatible Device
- I'm running Raspotify on a compatible Device
Compatible OS
- I'm running Raspotify on a compatible OS
Latest Version
- I'm running the latest version of Raspotify
Due Diligence
- I have done my due diligence
What happened?
Hi,
I wanted to be able to start a program (turn on my speakers with my Logitech Harmony) before casting the music to Raspotify.
To do so I modified the configuration file /etc/raspotify/conf to add these two lines
LIBRESPOT_VERBOSE=
LIBRESPOT_ONEVENT="/tmp/test.sh"
chmod +x /tmp/test.sh to be runnable
I restart the systemd for raspotify and everything looks fine (new options are detected).
When I cast a music, my script is not run and I found the error
Jun 26 11:09:30 XXXXX librespot[29379]: [2022-06-26T09:09:30Z TRACE librespot_connect::spirc] ==> kPlayStatusPlay
Jun 26 11:09:30 XXXXX librespot[29379]: [2022-06-26T09:09:30Z INFO librespot::player_event_handler] Running ["/tmp/test.sh"] with environment variables {"PLAYER_EVENT": "playing", "DURATION_MS": "304840", "POSITION_MS": "46834", "TRACK_ID": "4VqPOruhp5EdPBeR92t6lQ"}
Jun 26 11:09:30 XXXXX librespot[29379]: [2022-06-26T09:09:30Z WARN librespot] On event program failed to start
Librespot program is run from systemd (/lib/systemd/system/raspotify.service) with "DynamicUser=yes".
I think this option prevents my script "/tmp/test.sh" to be run.
Any help please ?
Cheers
Relevant log output
No response
Duplicate of #500