Skip to content

Commit

Permalink
[Feature] Support webserverdocumentroot #346 (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
GioF71 authored Nov 29, 2023
1 parent f9d79fa commit 9778bb0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ ENV LOG_LEVEL ""

ENV DUMP_ADDITIONAL_RADIO_LIST ""

ENV WEBSERVER_DOCUMENT_ROOT ""

ENV STARTUP_DELAY_SEC 0

VOLUME /uprcl/confdir
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ HRA_LANG|Your HRA account language
LOG_ENABLE|Set to `yes` to enable. If enabled, the logfile is `/log/upmpdcli.log`. Otherwise, umpdcli will log to stderr.
LOG_LEVEL|Defaults to `2`
DUMP_ADDITIONAL_RADIO_LIST|Dumps the additional radio file when set to `yes`
WEBSERVER_DOCUMENT_ROOT|Directory from which the internal HTTP server will directly serve files (e.g. icons), disabled by default
STARTUP_DELAY_SEC|Delay before starting the application, defaults to `0`. This can be useful if your container is set up to start automatically, so that you can resolve race conditions with mpd and with squeezelite if all those services run on the same audio device. I experienced issues with my Asus Tinkerboard, while the Raspberry Pi has never really needed this. Your mileage may vary. Feel free to report your personal experience.

### Volumes
Expand Down
7 changes: 7 additions & 0 deletions app/bin/run-upmpdcli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,13 @@ if [[ -n "${CHECK_CONTENT_FORMAT}" ]]; then
set_parameter $CONFIG_FILE CHECK_CONTENT_FORMAT "$check_content_format_value" "checkcontentformat"
fi

echo "WEBSERVER_DOCUMENT_ROOT=[${WEBSERVER_DOCUMENT_ROOT}]"
if [[ -n "${WEBSERVER_DOCUMENT_ROOT}" ]]; then
echo "Setting webserverdocumentroot to [$WEBSERVER_DOCUMENT_ROOT]"
sed -i 's/\#webserverdocumentroot/webserverdocumentroot/g' $CONFIG_FILE;
sed -i 's+WEBSERVER_DOCUMENT_ROOT+'"$WEBSERVER_DOCUMENT_ROOT"'+g' $CONFIG_FILE
fi

MEDIA_SERVER_ENABLED=0
if [[ "${UPRCL_ENABLE^^}" == "YES" ||
"${RADIO_BROWSER_ENABLE^^}" == "YES" ||
Expand Down
2 changes: 1 addition & 1 deletion app/conf/upmpdcli.conf
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ upradiostitle = Upmpdcli Radio List
# Radio Paradise
#radio-paradiseuser = radioparadise
#mother-earth-radiouser = motherearthradio

#webserverdocumentroot = WEBSERVER_DOCUMENT_ROOT
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
---|---
2023-11-29|Add support for webserverdocumentroot (see issue [#346](https://github.com/GioF71/upmpdcli-docker/issues/346))
2023-11-25|Support enabling internet radios in subsonic (see issue [#344](https://github.com/GioF71/upmpdcli-docker/issues/344))
2023-11-25|Update to Upmpdcli version 1.8.6 (see issue [#340](https://github.com/GioF71/upmpdcli-docker/issues/340))
2023-11-17|Support for subsonic server side scrobbling (see issue [#337](https://github.com/GioF71/upmpdcli-docker/issues/337))
Expand Down

0 comments on commit 9778bb0

Please sign in to comment.