From 7c7340df81452e7c4b472f23a728b4cbc0449c51 Mon Sep 17 00:00:00 2001 From: Giovanni Fulco Date: Wed, 11 Sep 2024 23:16:20 +0200 Subject: [PATCH] Do not save credentials to xml file (`-j`) by default --- Dockerfile | 1 + README.md | 2 ++ app/bin/run.sh | 14 +++++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 27bd17c..5c3fb7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,6 +39,7 @@ ENV PUID="" ENV PGID="" ENV PREFER_STATIC="" ENV VORBIS_BITRATE="" +ENV STORE_CRED_XML="" ENV OUTPUT_CODEC="" ENV UPNP_HTTP_CONTENT_LENGTH_MODE="" ENV UPNP_HTTP_CACHING_MODE="" diff --git a/README.md b/README.md index cc153ab..d877f9d 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ PUID|Group used to run the application, defaults to `1000` PGID|Group used to run the application, defaults to `1000` PREFER_STATIC|Prefer `-static` version of the executable, defaults to `no` VORBIS_BITRATE|Set the vorbis bitrate to `320`, `160` or `96`, defaults to `320` +STORE_CRED_XML|Set to `yes` to store credentials in the configuration file (`-j`), defaults to `no` SPOTCONNECT_MODE|SpotConnect mode: `upnp` or `raop` (for AirPlay), defaults to `upnp` OUTPUT_CODEC|Codec for the UPnP version, see [here](https://github.com/philippe44/SpotConnect?tab=readme-ov-file#upnp), possible values [here](#output-codec-values) UPNP_HTTP_CONTENT_LENGTH_MODE|For UPnP mode only, see [here](https://github.com/philippe44/SpotConnect#http-content-length-and-transfer-modes), possible values [here](#http-content-length-modes-upnp-only) @@ -155,6 +156,7 @@ The changelog of the upstream project is available [here](https://github.com/phi DATE|DESCRIPTION :---|:--- +2024-09-11|Do not save credentials to xml file (`-j`) by default 2024-09-10|Add support for http caching mode (`-A`) 2024-09-10|Add support for http content length mode (`-g`) 2024-09-10|Add support for output codec (`-c`) diff --git a/app/bin/run.sh b/app/bin/run.sh index 28cd696..ebce100 100644 --- a/app/bin/run.sh +++ b/app/bin/run.sh @@ -152,7 +152,19 @@ fi if [[ "${SPOTCONNECT_MODE}" == "raop" && ("${APPLETV_PAIRING_MODE^^}" == "YES" || "${APPLETV_PAIRING_MODE^^}" == "Y") ]]; then CMD_LINE="$CMD_LINE -x /config/$CONFIG_FILE_NAME -l" else - CMD_LINE="$CMD_LINE -x /config/$CONFIG_FILE_NAME -I -j -k -Z" + CMD_LINE="$CMD_LINE -x /config/$CONFIG_FILE_NAME -I -k -Z" +fi + +if [[ -n "${STORE_CRED_XML}" ]]; then + echo "STORE_CRED_XML=[${STORE_CRED_XML}]" + if [[ "${STORE_CRED_XML^^}" == "YES" ]] || [[ "${STORE_CRED_XML^^}" == "Y" ]]; then + CMD_LINE="$CMD_LINE -j" + elif [[ "${STORE_CRED_XML^^}" != "NO" ]] && [[ "${STORE_CRED_XML^^}" != "N" ]]; then + echo "Invalid STORE_CRED_XML=[${STORE_CRED_XML}]!" + exit 1 + fi +else + echo "STORE_CRED_XML not set, disabled by default" fi echo "NETWORK_SELECT=${NETWORK_SELECT}"