mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-19 12:06:15 +02:00
Change librespot "killall" default to false
This commit is contained in:
parent
c0e291635c
commit
7241a97348
3 changed files with 4 additions and 4 deletions
|
@ -38,7 +38,7 @@ pipe:///<path/to/pipe>?name=<name>[&mode=create][&dryout_ms=2000]
|
||||||
Launches librespot and reads audio from stdout
|
Launches librespot and reads audio from stdout
|
||||||
|
|
||||||
```sh
|
```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][¶ms=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][¶ms=extra-params]
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that you need to have the librespot binary on your machine and the sampleformat will be set to `44100:16:2`
|
Note that you need to have the librespot binary on your machine and the sampleformat will be set to `44100:16:2`
|
||||||
|
|
|
@ -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.
|
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/`
|
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
|
* Valid bitrates are 96, 160, 320
|
||||||
* `start command` and `stop command` are executed by Librespot at start/stop
|
* `start command` and `stop command` are executed by Librespot at start/stop
|
||||||
* For example: `onstart=/usr/bin/logger -t Snapcast Starting spotify...`
|
* 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.
|
* 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
|
### Process
|
||||||
|
|
|
@ -46,7 +46,7 @@ LibrespotStream::LibrespotStream(PcmListener* pcmListener, boost::asio::io_conte
|
||||||
string onevent = uri_.getQuery("onevent", "");
|
string onevent = uri_.getQuery("onevent", "");
|
||||||
bool normalize = (uri_.getQuery("normalize", "false") == "true");
|
bool normalize = (uri_.getQuery("normalize", "false") == "true");
|
||||||
bool autoplay = (uri_.getQuery("autoplay", "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())
|
if (username.empty() != password.empty())
|
||||||
throw SnapException("missing parameter \"username\" or \"password\" (must provide both, or neither)");
|
throw SnapException("missing parameter \"username\" or \"password\" (must provide both, or neither)");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue