From 21f36785c1264a25d9369cbb1784bcc4829d555c Mon Sep 17 00:00:00 2001 From: TheCaptain989 Date: Sat, 18 May 2024 20:37:16 -0500 Subject: [PATCH] Release 2.6.1 - Allow use of optional environmental variables for Radarr/Sonarr config - Updated Docker labels --- Dockerfile | 5 ++++- README.md | 4 ++-- root/usr/local/bin/striptracks.sh | 10 ++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2430414..e117603 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,10 @@ RUN \ ## Single layer deployed image ## FROM scratch -LABEL maintainer="TheCaptain989" +LABEL org.opencontainers.image.source=https://github.com/TheCaptain989/radarr-striptracks +LABEL org.opencontainers.image.description="A Docker Mod to Radarr/Sonarr to automatically strip out unwanted audio and subtitle streams" +LABEL org.opencontainers.image.licenses=GPL-3.0-only +LABEL org.opencontainers.image.authors="TheCaptain989" # Add files from buildstage COPY --from=buildstage /root-layer/ / diff --git a/README.md b/README.md index 0adaf55..922fdcc 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ A [Docker Mod](https://github.com/linuxserver/docker-mods) for the LinuxServer.i **This unified script works in both Radarr and Sonarr. Use this mod in either container!** >**NOTE:** This mod supports Linux OSes only. -Container info: +Production Container info: ![Docker Image Size](https://img.shields.io/docker/image-size/linuxserver/mods/radarr-striptracks "Container Size") +Development Container info: ![Docker Image Size](https://img.shields.io/docker/image-size/thecaptain989/radarr-striptracks "Container Size") ![Docker Pulls](https://img.shields.io/docker/pulls/thecaptain989/radarr-striptracks "Container Pulls") [![GitHub Super-Linter](https://github.com/TheCaptain989/radarr-striptracks/actions/workflows/linter.yml/badge.svg)](https://github.com/TheCaptain989/radarr-striptracks/actions/workflows/linter.yml "Linter Job") -Production Container info: ![Docker Image Size](https://img.shields.io/docker/image-size/linuxserver/mods/radarr-striptracks "Container Size") # Installation 1. Pull your selected container ([linuxserver/radarr](https://hub.docker.com/r/linuxserver/radarr "LinuxServer.io's Radarr container") or [linuxserver/sonarr](https://hub.docker.com/r/linuxserver/sonarr "LinuxServer.io's Sonarr container")) from GitHub Container Registry or Docker Hub: diff --git a/root/usr/local/bin/striptracks.sh b/root/usr/local/bin/striptracks.sh index 671b699..f257c12 100755 --- a/root/usr/local/bin/striptracks.sh +++ b/root/usr/local/bin/striptracks.sh @@ -911,6 +911,16 @@ elif [ -f "$striptracks_arr_config" ]; then [[ $striptracks_xml_entity = "ApiKey" ]] && striptracks_apikey=$striptracks_xml_content done < $striptracks_arr_config + # Allow use of environment variables from https://github.com/Sonarr/Sonarr/pull/6746 + striptracks_port_var="${striptracks_type^^}__SERVER__PORT" + [ -n "${!striptracks_port_var}" ] && striptracks_port="${!striptracks_port_var}" + striptracks_urlbase_var="${striptracks_type^^}__SERVER__URLBASE" + [ -n "${!striptracks_urlbase_var}" ] && striptracks_urlbase="${!striptracks_urlbase_var}" + striptracks_bindaddress_var="${striptracks_type^^}__SERVER__BINDADDRESS" + [ -n "${!striptracks_bindaddress_var}" ] && striptracks_bindaddress="${!striptracks_bindaddress_var}" + striptracks_apikey_var="${striptracks_type^^}__AUTH__APIKEY" + [ -n "${!striptracks_apikey_var}" ] && striptracks_apikey="${!striptracks_apikey_var}" + # Check for localhost [[ $striptracks_bindaddress = "*" ]] && striptracks_bindaddress=localhost