32 lines
817 B
Markdown
32 lines
817 B
Markdown
# snapcast-autoswitch
|
|
|
|
bash plumbing to make [snapcast] clients switch to any stream when it starts playing
|
|
|
|
> NOTE: snapcast recently [added an `meta` source type](https://github.com/badaix/snapcast/blob/master/doc/configuration.md#meta) in v0.22.0, making this script mostly obsolete
|
|
|
|
## install
|
|
```bash
|
|
# install dependencies
|
|
apt-get install bash jq curl netcat
|
|
|
|
# link scripts into $PATH
|
|
BIN=/usr/bin
|
|
ln -sf $PWD/setsnapstream $BIN/
|
|
ln -sf $PWD/snapswitch $BIN/
|
|
|
|
# install service
|
|
ln -sf $PWD/snapswitch.service /etc/systemd/system/
|
|
systemctl start snapswitch
|
|
systemctl enable snapswitch
|
|
```
|
|
|
|
## usage
|
|
manual switch to a stream for a given snapclient group
|
|
```
|
|
setsnapstream <stream id> [<snap group name> [<snapserver host>]]
|
|
```
|
|
|
|
[snapcast]: https://github.com/badaix/snapcast
|
|
|
|
## license
|
|
GPL, see LICENSE file
|