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

Add support for playlist play source: command through LMS #179

Open
nagyrobi opened this issue Mar 21, 2023 · 0 comments
Open

Add support for playlist play source: command through LMS #179

nagyrobi opened this issue Mar 21, 2023 · 0 comments

Comments

@nagyrobi
Copy link

nagyrobi commented Mar 21, 2023

According to LMS Command Line Interface documentation, it is possible to send an input source selection command from LMS to the Transporter hardware player:

Transporter Digital Inputs
Transporter Digital Inputs are handled as remote streams, with a URL starting with source: followed by aes-ebu, bnc-spdif, toslink or rca-spdif.
To set Transporter to the TOSLINK input, use <playerid> playlist play source:toslink
When set to a digital input, Transporter reports the URL scheme above to the various path, url or status queries.

With squeezelite, it would be very beneficial to have a similar behaviour, for example to command Alsamixer to unmute the line-input of the soundcard. Or to turn on a GPIO, or run an external script with LIRC sending IR signals etc...

The use case for this would be to be able to switch to the speakers other line input audio sources local to the device. Eg. you could build a soundbar-like device, where you wire the sound coming from your TV through the device running squeezelite (just like you would do with Transporter). And then you could simply choose through LMS standard methods activation of Line-In, or a relay or whatever.

Currently, if I run with -d all=info all I see in the console when trying to play source:toslink is:

[16:53:02.962] decode_flush:244 decode flush
[16:53:02.962] output_flush:439 flush output buffer

Would be useful to support any string after the source: keyword, not only aes-ebu, bnc-spdif, toslink or rca-spdif, but not sure if that's possible (depends on slimproto capability).

As a first step maybe it would be enough to have a command line option to pass a pair of parameters like:
-T <sourcestring>:<scriptfilename> where sourcestring could be the part coming after source: and scriptfilename could be the script to run (similar to -S).

So in the example above we could have -T toslink:~/do_something.sh to run ~/do_something.sh when LMS asks to play source:toslink.

And when reporting back to the various path, url or status queries, just return sourcestring.

Something like -T <sourcestring1>:<scriptfilename1>,<sourcestringN>:<scriptfilenameN> would allow us to define multiple source selection commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant