Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell events don't trigger #549

Open
kondas opened this issue Dec 30, 2022 · 2 comments
Open

Shell events don't trigger #549

kondas opened this issue Dec 30, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@kondas
Copy link

kondas commented Dec 30, 2022

Describe the bug
Shell events doesn't trigger

To Reproduce
Using this configuration, the shell commands don't get executed. I've compared the trace level logs, and there is no difference if the shell commands are enabled.

[shell]
	onTrackSeeked = ""
	onStartedLoading = ""
	onConnectionDropped = "rm -rf /opt/hifi/spocon-connected"
	onMetadataAvailable = ""
	onTrackChanged = ""
	onPanicState = ""
	onFinishedLoading = ""
	# Shell events enabled
	enabled = true
	onPlaybackResumed = ""
	onConnectionEstablished = "touch /opt/hifi/spocon-connected"
	onPlaybackEnded = ""
	onContextChanged = ""
	# Execute the command with `bash -c`
	executeWithBash = false
	onPlaybackPaused = ""
	onInactiveSession = ""
	onVolumeChanged = ""

Version/Commit
1.6.2

@kondas kondas added the bug Something isn't working label Dec 30, 2022
@kondas kondas changed the title Shell events dont trigger Shell events don't trigger Dec 30, 2022
@The-Judge
Copy link

The-Judge commented Jan 2, 2023

I observe the same.
I would really like to trigger something like a timeout counter when Playback ends, so my Raspberry Pi is shutdown after that period. But as @kondas already wrote: No difference in having enabled = true or not.

PS: It's also quite hard to understand from a user perspective how this works, since close to no docs seem to exist for this. Asking in the librespot Gitter channel for details on the shell section, the only resources I got pointed to after several days are:

  • The initial GitHub implementation request ( #329 )
  • The source code ( here )

@aleszczynskig
Copy link

aleszczynskig commented Mar 31, 2023

These are working correctly for me. I did have some troubles with them initially. You may find that setting the metadata pipe item in the configuration file to "" helps. i.e.

[player]
metadataPipe = ""

FYI - I did compile from the dev branch using the instructions here #321 but this may also work with the release version too.

I am reviewing the code (I am not a java dev) and I am not entirely sure why this works. I will post any observations should I discover them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants