diff --git a/README.md b/README.md index bea2129..fbf9516 100644 --- a/README.md +++ b/README.md @@ -196,7 +196,7 @@ AV_FRIENDLY_NAME|Name of the upnp renderer (UPnP AV mode), defaults to `upmpd-av FRIENDLY_NAME|Name of the renderer, overrides `UPMPD_FRIENDLY_NAME`, `AV_FRIENDLY_NAME` and `MEDIA_SERVER_FRIENDLY_NAME`. The variable `AV_FRIENDLY_NAME` is appended with the postfix `UPNPAV_POSTFIX`, unless UPNPAV is the only enabled renderer. See `UPNPAV_POSTFIX` and `UPNPAV_SKIP_NAME_POSTFIX` for more details. RENDERER_MODE|If set, this variable overrides `UPNPAV` and `OPENHOME`. Possible values are `NONE`, `OPENHOME`, `UPNPAV` and `BOTH` UPNPAV|Enable UPnP AV services (`0`/`1`), defaults to `0` -UPNPAV_POSTFIX|The postfix to be appended to the `FRIENDLY_NAME`, defaults to `(av)` +UPNPAV_POSTFIX|The postfix to be appended to the `FRIENDLY_NAME`, defaults to an empty string UPNPAV_POSTFIX_PREPEND_SPACE|Option to add a space before a custom `UPNPAV_POSTFIX`, enabled by default. Set to `no` di disable UPNPAV_SKIP_NAME_POSTFIX|If not set or set to `yes`, and if only `UPNPAV` renderer is enabled, the `UPNPAV_POSTFIX` postfix is not appended to `FRIENDLY_NAME` OPENHOME|Enable OpenHome services (`0`/`1`), defaults to `1` diff --git a/app/bin/run-upmpdcli.sh b/app/bin/run-upmpdcli.sh index 0817138..41bd0b0 100644 --- a/app/bin/run-upmpdcli.sh +++ b/app/bin/run-upmpdcli.sh @@ -260,7 +260,7 @@ fi if [ -n "${FRIENDLY_NAME}" ]; then echo "FRIENDLY_NAME=[${FRIENDLY_NAME}], UPNPAV_SKIP_NAME_POSTFIX=[${UPNPAV_SKIP_NAME_POSTFIX}]" if [[ -z "${UPMPD_FRIENDLY_NAME}" ]] && [[ $OPENHOME -eq 1 && $UPNPAV -eq 1 ]]; then - UPMPD_FRIENDLY_NAME="${FRIENDLY_NAME} (oh)" + UPMPD_FRIENDLY_NAME="${FRIENDLY_NAME} (OpenHome)" else UPMPD_FRIENDLY_NAME="${FRIENDLY_NAME}" fi @@ -277,11 +277,14 @@ if [ -n "${FRIENDLY_NAME}" ]; then echo "Invalid UPNPAV_POSTFIX_PREPEND_SPACE [${UPNPAV_POSTFIX_PREPEND_SPACE}]" exit 2 fi - AV_POSTFIX="(av)" + AV_POSTFIX="" if [[ -n "${UPNPAV_POSTFIX}" ]]; then AV_POSTFIX=${UPNPAV_POSTFIX} fi - AV_POSTFIX="$PREPENDED$AV_POSTFIX" + # prepend only if AV_POSTFIX is not empty + if [[ -n "${AV_POSTFIX}" ]]; then + AV_POSTFIX="$PREPENDED$AV_POSTFIX" + fi AV_FRIENDLY_NAME="${FRIENDLY_NAME}${AV_POSTFIX}" fi if [[ -z "${OH_PRODUCT_ROOM}" ]]; then diff --git a/doc/change-history.md b/doc/change-history.md index 40375d2..c815b5d 100644 --- a/doc/change-history.md +++ b/doc/change-history.md @@ -2,6 +2,7 @@ Change Date|Major Changes ---|--- +2024-03-05|Review default naming (see issue [#381](https://github.com/GioF71/upmpdcli-docker/issues/381))) 2024-03-05|Automatically set upnpip instead of upnpiface (see issue [#379](https://github.com/GioF71/upmpdcli-docker/issues/379))) 2024-02-29|Update workflow actions (see issue [#377](https://github.com/GioF71/upmpdcli-docker/issues/377))) 2024-02-12|Update to Upmpdcli version 1.8.7 (see issue [#371](https://github.com/GioF71/upmpdcli-docker/issues/371))