Change librespot "killall" default to false

This commit is contained in:
badaix 2020-12-15 18:17:35 +01:00
parent c0e291635c
commit 7241a97348
3 changed files with 4 additions and 4 deletions

View file

@ -38,7 +38,7 @@ pipe:///<path/to/pipe>?name=<name>[&mode=create][&dryout_ms=2000]
Launches librespot and reads audio from stdout
```sh
librespot:///<path/to/librespot>?name=<name>[&dryout_ms=2000][&username=<my username>&password=<my password>][&devicename=Snapcast][&bitrate=320][&wd_timeout=7800][&volume=100][&onevent=""][&normalize=false][&autoplay=false][&cache=""][&disable_audio_cache=false][&killall=true][&params=extra-params]
librespot:///<path/to/librespot>?name=<name>[&dryout_ms=2000][&username=<my username>&password=<my password>][&devicename=Snapcast][&bitrate=320][&wd_timeout=7800][&volume=100][&onevent=""][&normalize=false][&autoplay=false][&cache=""][&disable_audio_cache=false][&killall=false][&params=extra-params]
```
Note that you need to have the librespot binary on your machine and the sampleformat will be set to `44100:16:2`

View file

@ -200,11 +200,11 @@ Snapserver supports [shairport-sync](https://github.com/mikebrady/shairport-sync
Snapserver supports [librespot](https://github.com/librespot-org/librespot) with the `pipe` backend.
1. Build and copy the `librespot` binary somewhere to your `PATH`, e.g. `/usr/local/bin/`
2. Configure snapserver with `stream = spotify:///librespot?name=Spotify[&username=<my username>&password=<my password>][&devicename=Snapcast][&bitrate=320][&onstart=<start command>][&onstop=<stop command>][&volume=<volume in percent>][&cache=<cache dir>][&disable_audio_cache=false][&killall=true]`
2. Configure snapserver with `stream = spotify:///librespot?name=Spotify[&username=<my username>&password=<my password>][&devicename=Snapcast][&bitrate=320][&onstart=<start command>][&onstop=<stop command>][&volume=<volume in percent>][&cache=<cache dir>][&disable_audio_cache=false][&killall=false]`
* Valid bitrates are 96, 160, 320
* `start command` and `stop command` are executed by Librespot at start/stop
* For example: `onstart=/usr/bin/logger -t Snapcast Starting spotify...`
* If `killall` is `true` (default), all running instances of Librespot will be killed. This MUST be disabled on all spotify streams by setting it to `false` if you want to use multiple spotify streams.
* If `killall` is `true`, all running instances of Librespot will be killed. This MUST be disabled on all spotify streams by setting it to `false` if you want to use multiple spotify streams.
* If `disable_audio_cache` is `false` (default), downloaded audio files are cached in `<cache dir>`. If set to `true` audio files will not be cached on disk.
### Process

View file

@ -46,7 +46,7 @@ LibrespotStream::LibrespotStream(PcmListener* pcmListener, boost::asio::io_conte
string onevent = uri_.getQuery("onevent", "");
bool normalize = (uri_.getQuery("normalize", "false") == "true");
bool autoplay = (uri_.getQuery("autoplay", "false") == "true");
killall_ = (uri_.getQuery("killall", "true") == "true");
killall_ = (uri_.getQuery("killall", "false") == "true");
if (username.empty() != password.empty())
throw SnapException("missing parameter \"username\" or \"password\" (must provide both, or neither)");