Skip to content

Commit 35d1f6c

Browse files
authored
add ZEROCONF_INTERFACE option (#157)
1 parent 9709b65 commit 35d1f6c

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ ENV DITHER=""
9191

9292
ENV ZEROCONF_PORT=""
9393
ENV ZEROCONF_BACKEND=""
94+
ENV ZEROCONF_INTERFACE=""
9495

9596
ENV ENABLE_VOLUME_NORMALISATION=""
9697
ENV NORMALISATION_METHOD=""

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A Docker image for [librespot](https://github.com/librespot-org/librespot)
44

55
## News
66

7-
The newest `latest` image is based on the current `v0.7.1` version of [librespot](https://github.com/librespot-org/librespot) at [this commit](https://github.com/librespot-org/librespot/commit/987dfa5df2546a96d34582674a757a3dcc6036a7), is built using [my fork of librespot](https://github.com/GioF71/librespot).
7+
The newest `latest` image is based on the current `v0.8.0` version of [librespot](https://github.com/librespot-org/librespot) at [this commit](https://github.com/librespot-org/librespot/pull/1632/commits/0cbdd122ae81b51c62954c60b306051e9021a805), is built using [my fork of librespot](https://github.com/GioF71/librespot).
88
The purpose of that fork is just to set a version for this repository.
99

1010
## Reference
@@ -102,6 +102,7 @@ AP_PORT||Connect to an AP with a specified port. If no AP with that port is pres
102102
DISABLE_DISCOVERY||Disable zeroconf discovery mode. `Y` or `y` to disable discovery.
103103
DITHER||Dither algorithm: none, gpdf, tpdf, tpdf_hp. Defaults to tpdf for formats S16, S24, S24_3 and none for other formats.
104104
ZEROCONF_PORT||The port the internal server advertises over zeroconf: `1` - `65535`. Ports <= `1024` may require root privileges.
105+
ZEROCONF_INTERFACE||Comma-separated interface IP addresses on which zeroconf will bind (Example "192.168.0.10,10.0.0.10"). Defaults to all interfaces. Ignored by DNS-SD.
105106
ZEROCONF_BACKEND||Select the desidered backend, valid values are `avahi`, `libmdns`, `dns-sd`. With the latest builds, I am getting good results with `libmdns`, so it will be the default if discovery is not disabled
106107
ENABLE_VOLUME_NORMALISATION||Enables volume normalisation for librespot. `Y` or `y` to enable.
107108
NORMALISATION_METHOD||Specify the normalisation method to use: `basic`, `dynamic`. Defaults to `dynamic`.
@@ -124,7 +125,7 @@ ONEVENT_COMMAND||Specifies the name of a user defined script/executable that wil
124125
ONEVENT_POST_ENDPOINT||Send a `POST` request with event data to the specified endpoint URL whenever a player event occurs. Request body is `json` encoded and contains all available fields specified by the [librespot's player event handler](https://github.com/librespot-org/librespot/blob/dev/src/player_event_handler.rs). Will be ignored if `ONEVENT_COMMAND` is set.
125126
ENABLE_OAUTH||Set to `headless` to enable OAUTH authentication. You will need to run the container interactively the first time. Recommended to enable when caching is also enabled, otherwise the credentials file will be lost when the container is recreated.
126127
LOG_COMMAND_LINE||Set to `Y` or `y` to enable, `N` or `n` to disable. Defaults to `Y`.
127-
ADDITIONAL_ARGUMENTS||Use this to add additional arguments to be appended to the command line
128+
ADDITIONAL_ARGUMENTS||Use this to add additional arguments to be appended to the command line. </br> Librespot arguments can be found [here](https://github.com/librespot-org/librespot/wiki/Options).
128129

129130
### Pipe Mode
130131

app/bin/run-librespot.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ if [ $discovery_enabled -eq 1 ]; then
243243
echo "Using zeroconf port [$ZEROCONF_PORT}]"
244244
CMD_LINE="$CMD_LINE --zeroconf-port $ZEROCONF_PORT"
245245
fi
246+
if [ -n "$ZEROCONF_INTERFACE" ]; then
247+
echo "Using zeroconf interfaces [$ZEROCONF_INTERFACE}]"
248+
CMD_LINE="$CMD_LINE --zeroconf-interface $ZEROCONF_INTERFACE"
249+
fi
246250
zeroconf_backend=$DEFAULT_ZEROCONF_BACKEND
247251
if [[ -n "${ZEROCONF_BACKEND}" ]]; then
248252
zeroconf_backend=$ZEROCONF_BACKEND

0 commit comments

Comments
 (0)