spotifyd-docker/start.sh

36 lines
807 B
Bash
Raw Permalink Normal View History

2022-02-05 23:52:44 +00:00
#!/usr/bin/env sh
2022-02-06 22:35:47 +00:00
ARGS=""
2022-02-05 23:52:44 +00:00
2022-02-06 22:35:47 +00:00
if [ -n "$VOLUME_NORMALISATION" ]; then
ARGS="${ARGS} --volume-normalisation"
fi
if [ -n "$NORMALISATION_PREGAIN" ]; then
ARGS="${ARGS} --normalisation-pregain ${NORMALISATION_PREGAIN}"
fi
if [ -n "$BITRATE" ]; then
ARGS="${ARGS} --bitrate ${BITRATE}"
fi
if [ -n "$DEVICE_TYPE" ]; then
ARGS="${ARGS} --device-type ${DEVICE_TYPE}"
fi
if [ -n "$INITIAL_VOLUME" ]; then
ARGS="${ARGS} --initial-volume ${INITIAL_VOLUME}"
fi
2023-08-26 21:40:56 +00:00
# Disable mpris if not set to true
if [ -z "$USE_MPRIS" ] || [ "$USE_MPRIS" != "true" ]; then
ARGS="${ARGS} --use-mpris false"
fi
# extra args
if [ -n "$EXTRA_ARGS" ]; then
ARGS="${ARGS} ${EXTRA_ARGS}"
fi
/app/spotifyd --no-daemon --username "$USERNAME" --password "$PASSWORD" --device-name "${DEVICE_NAME:=Spotifyd}" $ARGS