Skip to content
This repository has been archived by the owner on Sep 3, 2023. It is now read-only.

Commit

Permalink
2022-04-01-r2
Browse files Browse the repository at this point in the history
  • Loading branch information
GioF71 committed Apr 1, 2022
1 parent 3992e6d commit 3e6ba42
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 57 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ TIDAL_APP_TOKEN|TOKEN|The Tidal application token. Since Tidal is unwilling to a
TIDAL_USERNAME|USERNAME|Tidal Username
TIDAL_PASSWORD|PASSWORD|Tidal password
TIDAL_AUDIOQUALITY|Q|The Tidal “audioquality” parameter. Possible values: HI_RES, LOSSLESS, HIGH, LOW. Default is HIGH.
MPD_PULSE_ENABLE_HTTPD|no|Enable HTTPD output (Remember to also expose port 8000 if you enable HTTPD)
MPD_PULSE_ENABLE_HTTPD|no|Enable HTTPD output. Values to enable: `y` or `yes`, case insentive. Remember to also expose port 8000 if you enable HTTPD.
MPD_PULSE_HTTPD_NAME|MPD_PULSE_HTTPD|HTTPD output name
MPD_PULSE_HTTPD_ALWAYS_ON|yes|HTTPD Always on
MPD_PULSE_HTTPD_TAGS|yes|HTTPD Tags
MPD_PULSE_HTTPD_ALWAYS_ON|yes|HTTPD Always on. Values to enable: `y` or `yes`, case insentive.
MPD_PULSE_HTTPD_TAGS|yes|HTTPD Tags. Values to enable: `y` or `yes`, case insentive.
STARTUP_DELAY_SEC|0|Delay before starting the application. 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.

## Caveat
Expand All @@ -174,6 +174,10 @@ Just be careful to use the tag you have built.

Release Date|Major Changes
---|---
2022-04-01|Clarified doc for httpd-related environment variables
2022-04-01|Removed unused full template
2022-04-01|Fixed script checking wrong variable for httpd not enabled
2022-04-01|Validation for httpd-related environment variables
2022-04-01|Remove spurious files related to incomplete feature
2022-04-01|Add version history
2022-04-01|Updated documentation with warning about restart policies
Expand Down
48 changes: 0 additions & 48 deletions app/assets/mpd-template-full.conf

This file was deleted.

10 changes: 5 additions & 5 deletions app/assets/mpd-template-httpd-output.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
audio_output {
type "httpd"
name "MPD_PULSE_HTTPD_NAME"
port "8000"
always_on "MPD_PULSE_HTTPD_ALWAYS_ON"
tags "MPD_PULSE_HTTPD_TAGS"
type "httpd"
name "MPD_PULSE_HTTPD_NAME"
port "8000"
always_on "MPD_PULSE_HTTPD_ALWAYS_ON"
tags "MPD_PULSE_HTTPD_TAGS"
}
16 changes: 15 additions & 1 deletion app/bin/run-mpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,30 @@ else
httpd_always_on=$MPD_PULSE_HTTPD_ALWAYS_ON
if [ -z "${httpd_always_on}" ]; then
httpd_always_on="yes"
else
check=${httpd_always_on^^}
if [[ "$check" == "Y" || "$check" == "YES" ]]; then
httpd_always_on="yes"
else
httpd_always_on="no"
fi
fi
httpd_tags=$MPD_PULSE_HTTPD_TAGS
if [ -z "${httpd_tags}" ]; then
httpd_tags="yes"
else
check=${httpd_tags^^}
if [[ "$check" == "Y" || "$check" == "YES" ]]; then
httpd_tags="yes"
else
httpd_tags="no"
fi
fi
sed -i 's/MPD_PULSE_HTTPD_NAME/'"$httpd_name"'/g' /etc/mpd.conf
sed -i 's/MPD_PULSE_HTTPD_ALWAYS_ON/'"$httpd_always_on"'/g' /etc/mpd.conf
sed -i 's/MPD_PULSE_HTTPD_TAGS/'"$httpd_tags"'/g' /etc/mpd.conf
else
if [ "$linear" == "N" ]; then
if [ "$enable_httpd" == "N" ]; then
echo "Variable MPD_PULSE_ENABLE_HTTPD set to disabled.";
else
echo "Variable MPD_PULSE_ENABLE_HTTPD invalid value: $MPD_PULSE_ENABLE_HTTPD";
Expand Down

0 comments on commit 3e6ba42

Please sign in to comment.