Skip to content

Commit

Permalink
Default naming #381 (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
GioF71 committed Mar 5, 2024
1 parent e17ef48 commit 7c2ddf4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
9 changes: 6 additions & 3 deletions app/bin/run-upmpdcli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions doc/change-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 7c2ddf4

Please sign in to comment.