diff --git a/.github/workflows/docker-multi-arch.yml b/.github/workflows/docker-multi-arch.yml index a666cc8..a22ff3c 100644 --- a/.github/workflows/docker-multi-arch.yml +++ b/.github/workflows/docker-multi-arch.yml @@ -1,58 +1,52 @@ name: Publish multi-arch Docker images on: - push: - branches: - - main + push: + branches: + - main jobs: - release: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - base: [ 'ubuntu:focal-20220302' ] - - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Set Release Tag - run: | - date=$(date '+%Y-%m-%d') - base="$(cut -d ':' -f2 <<< '${{ matrix.base }}')" - base="$(cut -d '-' -f1 <<< ${base})" - upmpdcli_version="upmpdcli-1.5.12-libupnpp-0.21.0" - image_name="${{secrets.DOCKER_USERNAME}}/upmpdcli" - full="${upmpdcli_version}-${base}-${date}" - version_and_base="${upmpdcli_version}-${base}" - base_only="${base}" - tags="${image_name}:${base_only},${image_name}:${version_and_base},${image_name}:${full},${image_name}:latest,${image_name}:stable" - echo "RELEASE_TAGS=${tags}" >> $GITHUB_ENV - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - with: - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build and push - uses: docker/build-push-action@v2 - with: - context: . - build-args: | - BASE_IMAGE=${{ matrix.base }} - DOWNLOAD_FROM_SOURCEFORGE=${{ matrix.sourceforge }} - platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 - push: true - tags: ${{ env.RELEASE_TAGS }} + release: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + base: ["ubuntu:jammy"] + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set Release Tag + run: | + date=$(date '+%Y-%m-%d') + base="$(cut -d ':' -f2 <<< '${{ matrix.base }}')" + base="$(cut -d '-' -f1 <<< ${base})" + upmpdcli_version="upmpdcli-1.5.20-libupnpp-0.22.2" + image_name="${{secrets.DOCKER_USERNAME}}/upmpdcli" + full="${upmpdcli_version}-${base}-${date}" + version_and_base="${upmpdcli_version}-${base}" + base_only="${base}" + tags="${image_name}:${base_only},${image_name}:${version_and_base},${image_name}:${full},${image_name}:latest,${image_name}:stable" + echo "RELEASE_TAGS=${tags}" >> $GITHUB_ENV + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + with: + platforms: all + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + build-args: | + BASE_IMAGE=${{ matrix.base }} + DOWNLOAD_FROM_SOURCEFORGE=${{ matrix.sourceforge }} + platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 + push: true + tags: ${{ env.RELEASE_TAGS }} diff --git a/01proxy b/01proxy new file mode 100644 index 0000000..4c77f29 --- /dev/null +++ b/01proxy @@ -0,0 +1 @@ +Acquire::http::proxy "http://apt.homelab.com:3142"; \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index d194612..4caf304 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,15 @@ -ARG BASE_IMAGE -FROM ${BASE_IMAGE} AS base +FROM ubuntu:jammy AS base + +COPY 01proxy /etc/apt/apt.conf.d/01proxy + +ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get upgrade -y && \ apt-get install -y software-properties-common && \ add-apt-repository ppa:jean-francois-dockes/upnpp1 && \ apt-get update && \ apt-get install upmpdcli -y && \ - apt-get install upmpdcli-qobuz -y && \ - apt-get install upmpdcli-spotify -y && \ - apt-get install upmpdcli-tidal -y && \ + apt-get install upmpdcli-* -y && \ apt-get remove software-properties-common -y && \ apt-get autoremove -y && \ rm -rf /var/lib/apt/lists/* @@ -19,13 +20,22 @@ RUN mkdir -p /app RUN mkdir -p /app/conf RUN mkdir -p /app/doc +RUN echo "--- BEGIN upmpdcli.conf ---" +RUN cat /etc/upmpdcli.conf +RUN echo "--- END upmpdcli.conf ---" + RUN cp /etc/upmpdcli.conf /app/conf/original.upmpdcli.conf -ENV UPMPD_FRIENDLY_NAME upmpd -ENV AV_FRIENDLY_NAME upmpd-av +ENV UPMPD_FRIENDLY_NAME "" +ENV AV_FRIENDLY_NAME "" + +ENV UPNPAV 1 +ENV OPENHOME 1 + +ENV MPD_HOST "" +ENV MPD_PORT "" -ENV MPD_HOST localhost -ENV MPD_PORT 6600 +ENV UPNPIFACE "" ENV TIDAL_ENABLE no ENV TIDAL_USERNAME tidal_username diff --git a/app/bin/run-upmpdcli.sh b/app/bin/run-upmpdcli.sh index fdb4010..f4e0d7c 100644 --- a/app/bin/run-upmpdcli.sh +++ b/app/bin/run-upmpdcli.sh @@ -8,10 +8,70 @@ if test -f "$CONFIG_FILE"; then else echo "Configuration file [$CONFIG_FILE] not found, creating." cp $SOURCE_CONFIG_FILE $CONFIG_FILE - sed -i 's/UPMPD_FRIENDLY_NAME/'"$UPMPD_FRIENDLY_NAME"'/g' $CONFIG_FILE - sed -i 's/AV_FRIENDLY_NAME/'"$AV_FRIENDLY_NAME"'/g' $CONFIG_FILE - sed -i 's/MPD_HOST/'"$MPD_HOST"'/g' $CONFIG_FILE - sed -i 's/MPD_PORT/'"$MPD_PORT"'/g' $CONFIG_FILE + + echo "UPNPIFACE=["$UPNPIFACE"]" + if [ -z "${UPNPIFACE}" ]; then + echo "UPNPIFACE not set" + else + echo "Setting UPNPIFACE to ["$UPNPIFACE"]" + sed -i 's/\#upnpiface/upnpiface/g' $CONFIG_FILE; + sed -i 's/UPNPIFACE/'"$UPNPIFACE"'/g' $CONFIG_FILE; + fi + + echo "UPMPD_FRIENDLY_NAME=["$UPMPD_FRIENDLY_NAME"]" + if [ -z "${UPMPD_FRIENDLY_NAME}" ]; then + echo "UPMPD_FRIENDLY_NAME not set" + else + echo "Setting UPMPD_FRIENDLY_NAME to ["$UPMPD_FRIENDLY_NAME"]" + sed -i 's/\#friendlyname/friendlyname/g' $CONFIG_FILE; + sed -i 's/UPMPD_FRIENDLY_NAME/'"$UPMPD_FRIENDLY_NAME"'/g' $CONFIG_FILE; + fi + + echo "UPNPAV=["$UPNPAV"]" + if [ -z "${UPNPAV}" ]; then + echo "UPNPAV not set" + else + echo "Setting UPNPAV to ["$UPNPAV"]" + sed -i 's/\#upnpav/upnpav/g' $CONFIG_FILE; + sed -i 's/UPNPAV/'"$UPNPAV"'/g' $CONFIG_FILE; + fi + + echo "OPENHOME=["$OPENHOME"]" + if [ -z "${OPENHOME}" ]; then + echo "OPENHOME not set" + else + echo "Setting OPENHOME to ["$OPENHOME"]" + sed -i 's/\#openhome/openhome/g' $CONFIG_FILE; + sed -i 's/OPENHOME/'"$OPENHOME"'/g' $CONFIG_FILE; + fi + + echo "AV_FRIENDLY_NAME=["$AV_FRIENDLY_NAME"]" + if [ -z "${AV_FRIENDLY_NAME}" ]; then + echo "AV_FRIENDLY_NAME not set" + else + echo "Setting AV_FRIENDLY_NAME to ["$AV_FRIENDLY_NAME"]" + sed -i 's/\#avfriendlyname/avfriendlyname/g' $CONFIG_FILE; + sed -i 's/AV_FRIENDLY_NAME/'"$AV_FRIENDLY_NAME"'/g' $CONFIG_FILE; + fi + + echo "MPD_HOST=["$MPD_HOST"]" + if [ -z "${MPD_HOST}" ]; then + echo "MPD_HOST not set" + else + echo "Setting MPD_HOST to ["$MPD_HOST"]" + sed -i 's/\#mpdhost/mpdhost/g' $CONFIG_FILE; + sed -i 's/MPD_HOST/'"$MPD_HOST"'/g' $CONFIG_FILE; + fi + + echo "MPD_PORT=["$MPD_PORT"]" + if [ -z "${MPD_PORT}" ]; then + echo "MPD_PORT not set" + else + echo "Setting MPD_PORT to ["$MPD_PORT"]" + sed -i 's/\#mpdport/mpdport/g' $CONFIG_FILE; + sed -i 's/MPD_PORT/'"$MPD_PORT"'/g' $CONFIG_FILE; + fi + echo "Tidal Enable: $TIDAL_ENABLE" if [ "$TIDAL_ENABLE" == "yes" ]; then echo "Processing Tidal settings"; diff --git a/app/conf/upmpdcli.conf b/app/conf/upmpdcli.conf index 698ec1f..9f7e7ab 100644 --- a/app/conf/upmpdcli.conf +++ b/app/conf/upmpdcli.conf @@ -1,104 +1,264 @@ +#The XML tags in the comments are used to help produce the documentation +#from the sample/reference file, and not at all at run time, where +#comments are just comments. Edit at will. +#The command line options have higher priorities than the values in +#this file. + +# Upmpdcli configuration + + +# Upmpdcli general parameters + +# Log file name. #logfilename = +# Log level. #loglevel = 2 +# XML and other constant data storage directory. #pkgdatadir=/usr/share/upmpdcli +# Name of lock file used to store the current process pid. #pidfile = /var/run/upmpdcli.pid -#upnpiface = + +# UPnP network parameters + +# Network interface to use for UPnP. +#upnpiface = UPNPIFACE +# IP address to use for UPnP, alternative to using an interface name. #upnpip = +# Port number used for UPnP. #upnpport = +# Enable use of IPV6. #useipv6 = false -friendlyname = UPMPD_FRIENDLY_NAME -avfriendlyname = AV_FRIENDLY_NAME -#upnpav = 1 -#openhome = 1 + +# Media Renderer parameters + +# "Friendly Name" for the Media Renderer. +#friendlyname = UPMPD_FRIENDLY_NAME +# Specific friendly name for the UPnP/AV Media Renderer. +#avfriendlyname = AV_FRIENDLY_NAME +# Enable UPnP AV services (0/1). +#upnpav = UPNPAV +# Enable OpenHome services (0/1). +#openhome = OPENHOME +# Disable the OpenHome Credentials service. #lumincompat = 0 +# Store metadata into the OpenHome "metatext" variable. +#ohinfotexttodata = 0 +# Save the streaming services login parameters to disk. #saveohcredentials = 1 +# Check that input format is supported. #checkcontentformat = 1 +# Path to the openssl command #opensslcmd = +# Path to the Renderer icon. #iconpath = /usr/share/upmpdcli/icon.png +# Directory used to store cached data #cachedir = /var/cache/upmpdcli +# Path to the presentation HTML document #presentationhtml = /usr/share/upmpdcli/presentation.html -#enablel16 = false +# Advertise L16 format support +#enablel16 = true + +# MPD parameters -mpdhost = MPD_HOST -mpdport = MPD_PORT +# Host MPD runs on. +#mpdhost = MPD_HOST +# IP port used by MPD +#mpdport = MPD_PORT +# MPD password. #mpdpassword = +# MPD connection timeout in milliseconds. #mpdtimeoutms = 2000 +# Set if we own the MPD queue. #ownqueue = 1 +# Audio control hooks + +# Command to run when playback is about to begin. #onstart = +# Command to run when MPD state switches to "PLAY". #onplay = +# Command to run when MPD state switches to "PAUSE". #onpause = +# Command to run when MPD state switches to "STOP". #onstop = +# Command to run when the setstandby action is called. #onstandby = +# Use external command to manage the the sound volume (0/1). #externalvolumecontrol = +# Command to run for reading the sound volume. #getexternalvolume = +# Command to run to set the volume. #onvolumechange = +# UPnP/AV tweaking + +# Automatically fake a Play command when track is set. #avtautoplay = 0 +# OpenHome parameters + +# The name of the room where the Product is located. #ohproductroom = Main Room +# Path to an external file with radio definitions. radiolist = /usr/share/upmpdcli/radio_scripts/radiolist.conf +# Radio metadata scripts directory. +#radioscripts = /usr/share/upmpdcli/radio_scripts +# Manufacturer name. #ohmanufacturername = UpMPDCli heavy industries Co. +# Manufacturer information. #ohmanufacturerinfo = Such nice guys and gals +# URL for manufacturer web site. #ohmanufacturerurl = http://www.lesbonscomptes.com/upmpdcli +# Uri for manufacturer’s logo. #ohmanufacturerimageuri = +# Model name. #ohmodelname = UpMPDCli UPnP-MPD gateway +# Model information. #ohmodelinfo = +# URL for model web site. #ohmodelurl = http://www.lesbonscomptes.com/upmpdcli +# Uri for model’s icon. #ohmodelimageuri = +# User-visible product name. By default this is set to ModelName. #ohproductname = Upmpdcli +# Product information. #ohproductinfo = +# URL for product web site. This may be the UPnP presentation page. #ohproducturl = +# Uri for product image. #ohproductimageuri = +# Save queue metadata to disk (0/1). #ohmetapersist = 1 +# Mimimum interval (Seconds) between two cache saves. #ohmetasleep = 0 +# Media Server general parameters + +# Friendly name for the Media Server (if enabled). #msfriendlyname = +# Hostname/IP address used in proxy URLs. #plgmicrohttphost = +# IP port for the tidal/qobuz local HTTP service. #plgmicrohttpport = 49149 +# Decide if we proxy (copy: fetch/serve), or redirect the streaming services streams. #plgproxymethod = redirect +# Path to the Media Server icon. #msiconpath = /usr/share/upmpdcli/icon.png +# Highresaudio streaming service parameters + +# Hra user name. #hrauser = your hra user name +# Hra password. #hrapass = your Hra password +# Hra language setting (en/de). #hralang = en +# Spotify streaming service parameters + +# Spotify user name. #spotifyuser = me@some.place +# Spotify password. #spotifypass = agoodpassword +# Spotify preferred bitrate: 160 (default), 320 or 96. #spotifybitrate = 160 -#tidaluser = TIDAL_USERNAME -#tidalpass = TIDAL_PASSWORD -#tidalapitoken = TIDAL_API_TOKEN -#tidalquality = TIDAL_QUALITY +# Tidal streaming service parameters + +# Tidal user name. +#tidaluser = your tidal user name +# Tidal password. +#tidalpass = your Tidal password +# Tidal API token. +#tidalapitoken = thetoken +# Tidal stream quality. +#tidalquality = low + +# Qobuz streaming service parameters + +# Qobuz user name. +#qobuzuser = me@some.place +# Qobuz password. +#qobuzpass = agoodpassword +# Qobuz stream quality. +#qobuzformatid = 6 + +# Deezer streaming service parameters + +# Deezer user name. +#deezeruser = me@some.place +# Deezer password. +#deezerpass = agoodpassword -#qobuzuser = QOBUZ_USERNAME -#qobuzpass = QOBUZ_PASSWORD -#qobuzformatid = QOBUZ_FORMAT_ID +# Local Media Server parameters +# Bogus user name variable. #uprcluser = bugsbunny -#uprcltitle = Local Music +# Plugin Title. +uprcltitle = Local Music +# HTTP host and port for serving media files #uprclhostport = -#uprclconfdir = /index-dir +# uprcl Recoll index directory +#uprclconfdir = /var/cache/upmpdcli/uprcl +# Name of the user Recoll config additions file #uprclconfrecolluser = /var/cache/upmpdcli/uprcl/recoll.conf.user +# Name of the Minim Server configuration file #uprclminimconfig = -#uprclmediadirs = /media-dir +# Media directories +#uprclmediadirs = /tmp +# Path translations. #uprclpaths = +# Upmpdcli Radios plugin parameters + +# Bogus user name variable. +#upradiosuser = bugsbunny +# Plugin Title. +upradiostitle = Upmpdcli Radio List + +# Upmpdcli BBC Sounds plugin parameters + +# Bogus user name variable. +#bbcuser = bugsbunny +# Past days in BBC Sounds catalog listing. +#bbcprogrammedays = 30 + +# Songcast Receiver parameters + +#Parameters for the Songcast modes. These are read by either/both the +#songcast and upmpdcli processes +# Log file name for sc2mpd (default stderr) #sclogfilename = +# Log verbosity for sc2mpd. #scloglevel = 3 +# sc2mpd play method (mpd/alsa). #scplaymethod = mpd +# Port used by sc2mpd for MPD to connect to. #schttpport = 8768 +# Alsa device used by sc2mpd for playing audio. #scalsadevice = default +# sc2mpd resampling method. #sccvttype = SRC_SINC_FASTEST +# Scale songcast stream based on mpd volume value #scusempdvolume = 0 +# Path to sc2mpd. #sc2mpd = +# Path to a screceiver state file. #screceiverstatefile = +# Songcast Sender parameters + +#Parameters tor the Sender/Receiver mode. Only does anything if #scplaymethod is alsa +# !!Standard Songcast receivers only support PCM!! Codec to use for the network stream. #scstreamcodec = +# Path to starter script #scsenderpath = +# Scale the Songcast stream. #scstreamscaled = 1 +# localhost port to be used by the auxiliary mpd. #scsendermpdport = 6700 +# External sources script directory. #scripts_dir = /usr/share/upmpdcli/src_scripts +# Grace period to wait for a script process to exit before it is forcely killed. #scscriptgracesecs = 2 diff --git a/build.sh b/build.sh index bd9b065..eaee126 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #!/bin/bash -TAG_FAMILY="focal-20220113" -TAG_SL_VERSION="upmpdcli-1.5.12-libupnpp-0.21.0" +TAG_FAMILY="jammy" +TAG_SL_VERSION="upmpdcli-1.5.20-libupnpp-0.22.2" TODAY=`date +%F` echo "TODAY: "$TODAY @@ -16,9 +16,7 @@ tags=($TAG_TODAY $TAG_INTERMEDIATE $TAG_FAMILY latest stable) for tag in "${tags[@]}"; do docker build \ - --push \ - --platform linux/arm/v7,linux/arm64,linux/amd64 \ - --tag giof71/upmpdcli:$tag \ + --build-arg BASE_IMAGE=ubuntu:jammy --tag giof71/upmpdcli:$tag \ . #docker build \ # --push \ diff --git a/example-upmpdcli.conf b/reference-upmpdcli.conf similarity index 90% rename from example-upmpdcli.conf rename to reference-upmpdcli.conf index 3c03866..bd1c8b6 100644 --- a/example-upmpdcli.conf +++ b/reference-upmpdcli.conf @@ -21,7 +21,7 @@ # UPnP network parameters # Network interface to use for UPnP. -#upnpiface = +#upnpiface = # IP address to use for UPnP, alternative to using an interface name. #upnpip = # Port number used for UPnP. @@ -41,6 +41,8 @@ #openhome = 1 # Disable the OpenHome Credentials service. #lumincompat = 0 +# Store metadata into the OpenHome "metatext" variable. +#ohinfotexttodata = 0 # Save the streaming services login parameters to disk. #saveohcredentials = 1 # Check that input format is supported. @@ -54,7 +56,7 @@ # Path to the presentation HTML document #presentationhtml = /usr/share/upmpdcli/presentation.html # Advertise L16 format support -#enablel16 = false +#enablel16 = true # MPD parameters @@ -99,6 +101,8 @@ #ohproductroom = Main Room # Path to an external file with radio definitions. radiolist = /usr/share/upmpdcli/radio_scripts/radiolist.conf +# Radio metadata scripts directory. +#radioscripts = /usr/share/upmpdcli/radio_scripts # Manufacturer name. #ohmanufacturername = UpMPDCli heavy industries Co. # Manufacturer information. @@ -177,14 +181,21 @@ radiolist = /usr/share/upmpdcli/radio_scripts/radiolist.conf # Qobuz password. #qobuzpass = agoodpassword # Qobuz stream quality. -#qobuzformatid = 5 +#qobuzformatid = 6 + +# Deezer streaming service parameters + +# Deezer user name. +#deezeruser = me@some.place +# Deezer password. +#deezerpass = agoodpassword # Local Media Server parameters # Bogus user name variable. #uprcluser = bugsbunny # Plugin Title. -#uprcltitle = Local Music +uprcltitle = Local Music # HTTP host and port for serving media files #uprclhostport = # uprcl Recoll index directory @@ -198,6 +209,20 @@ radiolist = /usr/share/upmpdcli/radio_scripts/radiolist.conf # Path translations. #uprclpaths = +# Upmpdcli Radios plugin parameters + +# Bogus user name variable. +#upradiosuser = bugsbunny +# Plugin Title. +upradiostitle = Upmpdcli Radio List + +# Upmpdcli BBC Sounds plugin parameters + +# Bogus user name variable. +#bbcuser = bugsbunny +# Past days in BBC Sounds catalog listing. +#bbcprogrammedays = 30 + # Songcast Receiver parameters #Parameters for the Songcast modes. These are read by either/both the