spotifyd-docker/start.sh

36 lines
807 B
Bash
Executable File

#!/usr/bin/env sh
ARGS=""
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
# 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