diff --git a/README.md b/README.md index 83481a1..5096c0d 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,9 @@ PARAM|DESCRIPTION -s|Card format, optional (`S32_LE`, `S16_LE`, etc) -c|MQA Codec, defaults to `false` -p|MQA Passthrough, defaults to `false` +-r|Asound file prefix +-o|Force playback device +-a|Name of the virtual sound card in the generated asound.conf file -t|Sleep time in seconds be, defaults to `3` -d|DNS Server list, defaults to `8.8.8.8 8.8.4.4` (Google's DNS servers) @@ -292,6 +295,7 @@ An already started tidal-connect container should start working immediately, at Date|Comment :---|:--- +2024-02-17|Add support for newer variables in configure.sh, see [#108](https://github.com/GioF71/tidal-connect/issues/108) 2024-01-30|Add support for ASOUND_FILE_PREFIX, see [#101](https://github.com/GioF71/tidal-connect/issues/101) 2024-01-26|Assume `custom` playback device when asound.conf is provided, see [#90](https://github.com/GioF71/tidal-connect/issues/90) 2024-01-25|Support custom asound.conf, support forced PLAYBACK device, see [#80](https://github.com/GioF71/tidal-connect/issues/80) diff --git a/configure.sh b/configure.sh index 81037d4..3266a7a 100755 --- a/configure.sh +++ b/configure.sh @@ -8,7 +8,7 @@ set -e ENV_FILE=.env chmod 755 bin/entrypoint.sh -while getopts n:i:d:s:f:m:c:p:t:d: flag +while getopts n:i:d:s:f:m:c:p:r:o:a:t:d: flag do case "${flag}" in n) card_name=${OPTARG};; @@ -19,6 +19,9 @@ do m) model_name=${OPTARG};; c) mqa_codec=${OPTARG};; p) mqa_passthrough=${OPTARG};; + r) asound_file_prefix=${OPTARG};; + o) force_playback_device=${OPTARG};; + a) created_asound_card_name=${OPTARG};; t) sleep_time_sec=${OPTARG};; d) dns_server_list=${OPTARG};; @@ -34,6 +37,9 @@ echo "card_index=[$card_index]" echo "card_name=[$card_name]" echo "card_device=[$card_device]" echo "card_format=[$card_format]" +echo "asound_file_prefix=[$asound_file_prefix]" +echo "force_playback_device=[$force_playback_device]" +echo "created_asound_card_name=[$created_asound_card_name]" if test -f $ENV_FILE; then truncate -s 0 $ENV_FILE @@ -104,6 +110,21 @@ if [[ -n "${card_format}" ]]; then echo "CARD_FORMAT=${card_format}" >> $ENV_FILE fi +if [[ -n "${asound_file_prefix}" ]]; then + echo "Setting ASOUND_FILE_PREFIX to [$asound_file_prefix]" + echo "ASOUND_FILE_PREFIX=${asound_file_prefix}" >> $ENV_FILE +fi + +if [[ -n "${force_playback_device}" ]]; then + echo "Setting FORCE_PLAYBACK_DEVICE to [$force_playback_device]" + echo "FORCE_PLAYBACK_DEVICE=${force_playback_device}" >> $ENV_FILE +fi + +if [[ -n "${created_asound_card_name}" ]]; then + echo "Setting CREATED_ASOUND_CARD_NAME to [$created_asound_card_name]" + echo "CREATED_ASOUND_CARD_NAME=${created_asound_card_name}" >> $ENV_FILE +fi + echo -e "\nFinal .env file:\n" cat .env