From cea9b46cd2217f24c7d6eaadd049cd4365e3bca4 Mon Sep 17 00:00:00 2001 From: TheCaptain989 Date: Tue, 18 Jun 2024 18:09:25 -0500 Subject: [PATCH 1/8] Updated README --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 922fdcc9..3d7094e9 100644 --- a/README.md +++ b/README.md @@ -6,10 +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. -Production Container info: ![Docker Image Size](https://img.shields.io/docker/image-size/linuxserver/mods/radarr-striptracks "Container Size") +Production Container info: ![Docker Image Size](https://img.shields.io/docker/image-size/linuxserver/mods/radarr-striptracks "Container Size") +[![linuxserver/docker-mods/mods/radarr-striptracks](https://img.shields.io/badge/dynamic/json?logo=github&url=https%3A%2F%2Fraw.githubusercontent.com%2Fthecaptain989%2Fghcr-pulls%2Fmaster%2Findex.json&query=%24%5B%3F(%40.owner%3D%3D%22linuxserver%22%20%26%26%20%40.repo%3D%3D%22docker-mods%22%20%26%26%20%40.image%3D%3D%22mods%22%20%26%26%20%40.tag%3D%3D%22radarr-striptracks%22)%5D.pulls&label=ghcr%20pulls&color=1572A4)](https://github.com/linuxserver/docker-mods/pkgs/container/mods) 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") +![Docker Pulls](https://img.shields.io/docker/pulls/thecaptain989/radarr-striptracks?logo=docker "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") # Installation From d610026693d9c88e58b70db15961bcafc4ef2f1e Mon Sep 17 00:00:00 2001 From: TheCaptain989 Date: Fri, 21 Jun 2024 15:44:28 -0500 Subject: [PATCH 2/8] Update README.md - Grammar only --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3d7094e9..a30d014b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # About -A [Docker Mod](https://github.com/linuxserver/docker-mods) for the LinuxServer.io Radarr/Sonarr v3 Docker container that adds a script to automatically strip out unwanted audio and subtitle tracks, keeping only the desired languages. +A [Docker Mod](https://github.com/linuxserver/docker-mods) for the LinuxServer.io Radarr/Sonarr v3 or higher Docker containers that adds a script to automatically strip out unwanted audio and subtitle tracks, keeping only the desired languages. **Beginning with version 2.0 of this mod, it only supports v3 or later of Radarr/Sonarr. For legacy Radarr/Sonarr v2 please use mod release 1.3 or earlier** @@ -102,7 +102,7 @@ The language selection **'Unknown'** will match tracks with **no configured lang The Radarr language selection **'Any'** has two purposes: 1) It will trigger a search of languages in ***Custom Formats*** - 2) If none are found, it will will preserve **all languages** in the video file. This is functionally equivalent to calling the script with `--audio :any --subs :any` command-line options. See [Any language code](./README.md#any-language-code) below for more details. + 2) If none are found, it will preserve **all languages** in the video file. This is functionally equivalent to calling the script with `--audio :any --subs :any` command-line options. See [Any language code](./README.md#any-language-code) below for more details. >**Note:** When using the *Custom Format* conditions and scoring to select languages you may not get the results you expect. >This can be non-intuitive configuration, especially when using negative scoring and the 'Negate' option. @@ -155,15 +155,15 @@ Where: Option|Argument|Description ---|---|--- --a, --audio||Audio languages to keep
ISO639-2 code(s) prefixed with a colon (`:`) --s, --subs||Subtitle languages to keep
IISO639-2 code(s) prefixed with a colon (`:`) +-a, --audio||Audio languages to keep
ISO 639-2 code(s) prefixed with a colon (`:`) +-s, --subs||Subtitle languages to keep
ISO 639-2 code(s) prefixed with a colon (`:`) -f, --file||If included, the script enters **[Batch Mode](./README.md#batch-mode)** and converts the specified video file.
Requires the `-a` option.
![danger] **WARNING:** Do not use this argument when called from Radarr or Sonarr! -l, --log|\|The log filename
Default of /config/log/striptracks.txt -d, --debug|\[\\]|Enables debug logging. Level is optional.
Default of 1 (low)
2 includes JSON output
3 contains even more JSON output --help| |Display help and exit. --version| |Display version and exit. -The `` and `` are optional arguments that are colon (`:`) prepended language codes in [ISO639-2](https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes "List of ISO 639-2 codes") format. +The `` and `` are optional arguments that are colon (`:`) prepended language codes in [ISO 639-2](https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes "List of ISO 639-2 codes") format. For example: * `:eng` @@ -189,7 +189,7 @@ Several [Included Wrapper Scripts](./README.md#included-wrapper-scripts) use thi ### Unknown language code The `:und` language code is a special code. When used, the script will match on any track that has a null or blank language attribute. If not included, tracks with no language attribute will be removed. ->![danger] **NOTE:** It is common for M2TS and AVI containers to have tracks with unknown languages! It is strongly recommended to include `:und` in most instances unless you know exactly what you're doing. +>![danger] **NOTE:** It is common for M2TS and AVI files to have tracks with unknown languages! It is strongly recommended to include `:und` in most instances unless you know exactly what you're doing. ## Special Handling of Audio The script is smart enough to not remove the last audio track. There is in fact no way to force the script to remove all audio. This way you don't have to specify every possible language if you are importing a foreign film, for example. From 6d86a1bf83f01bbb7c1c9df2e44aba91f4929caa Mon Sep 17 00:00:00 2001 From: TheCaptain989 Date: Fri, 21 Jun 2024 15:50:20 -0500 Subject: [PATCH 3/8] Update Dockerfile - Bump to Alpine 3.20 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e1176038..e6b09e66 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 ## Buildstage ## -FROM ghcr.io/linuxserver/baseimage-alpine:3.19 as buildstage +FROM ghcr.io/linuxserver/baseimage-alpine:3.20 as buildstage ARG MOD_VERSION @@ -21,7 +21,7 @@ FROM scratch 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" +LABEL org.opencontainers.image.authors="TheCaptain989 " # Add files from buildstage COPY --from=buildstage /root-layer/ / From 57888b41fe2d70c06f52fc85e0aaf64b0fcf7e04 Mon Sep 17 00:00:00 2001 From: TheCaptain989 Date: Thu, 15 Aug 2024 18:35:26 -0500 Subject: [PATCH 4/8] Release 2.7.1 # What's Changed - **New** Uses semantic versioning - **New** Added installation script and documentation for hotio containers - **Fixes** TheCaptain989/radar-striptracks#73 - Light editing of README - Added GHCR pull counts - Updated Docker image labeling --- .assets/hotio-striptracks-synology.png | Bin 0 -> 15930 bytes .dockerignore | 2 + .github/workflows/BuildImage.yml | 2 +- Dockerfile | 8 ++- README.md | 8 ++- SECURITY.md | 4 +- hotio/99-striptracks.sh | 87 +++++++++++++++++++++++++ hotio/HOTIO.md | 86 ++++++++++++++++++++++++ root/usr/local/bin/striptracks.sh | 83 ++++++++++++++++++++++- 9 files changed, 271 insertions(+), 9 deletions(-) create mode 100644 .assets/hotio-striptracks-synology.png create mode 100644 hotio/99-striptracks.sh create mode 100644 hotio/HOTIO.md diff --git a/.assets/hotio-striptracks-synology.png b/.assets/hotio-striptracks-synology.png new file mode 100644 index 0000000000000000000000000000000000000000..2439429eae8880cd9fcee6fed8626b4a949f021d GIT binary patch literal 15930 zcmbumby!qi_clHVh=_m)3P`C)cQ*r4N=r(2cXudCr*wnF&`5Vl=Kw=UOAcKF3^6e8 z;OBY1`FpSTj~~~?nX}K?XYaN5*?X;f-D{mNWkng>$1fiP007(%? zQO9x#(e)) z0{$Q=uI8zKu!QgVd^3~n*x*&*s|SgpZ^^$HYxeTEnRO9PwmI6h?D=hIgase!Rl6N& zl+``rRw^iNDKEEmSQ0K`c%{v>yyWKa`-WKy-Q9`G!(sN@(z|G7Uq<_?dSmPm44zM4 zLNVVtudLiyY-I{?xhQ@o91{>&0e7>*#)Ob#8CS4$xF0nCYv{EU7D`O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B9<}URsd@ZkpIA8I7&cdvk&EGoU^lKea3$XDjT~Rs`@=i-!9ZthU@!1d z#Y@u#3%JXG^>5iYHs>bU->G17WVgS*+T@71FT+KBp{^2^cT`^!ek>v8Gj?sIc(naz z47>Y3B)pYnPa&4<_Dql&v8jYp^EVA$Ytq~H7W3>6A2;pvSyNRdRVD43xGOW*Kb$$e zDj)&ntMLkZz!u$fU;_`2$*Ql-U8^B>gb4(5W5eE6GPd!^Ujf_iKPeC2c(Slq!}-?0 z2(I~?hN>+94=zkjf|?+iwzAEU55P#ihgn|7iUM2N$fLaaZJ*~^AalB z`7IfVW+IjGqPL9E$cs=Vs7!EdT4Nz2=SyjDJgp~WnvO-0LH$cwIZgyK?jO+f?$;YK zS7*O=oY+T^Y1Fc?U-r%Q7Yb`1nmFqib=Epdn}$^tl1n1A`Mx1C!kE<$3aKTqDSLTq z_uWe$n^~EJG*%6(C2*!$iN-@88YoUrnl|hB9|`EG2(G(5KYoCy|DOJ zcB_By4+cxNL93%&!`Vec1eh7ZDCYY0AvlS97EPZDOFwQ@{>@l~?LPHfPiL{SMnTl7 zc(qh=_^JP@IbC#@Zl2R2`i3N00(*Flaox25w$|-WRMOi*TxzBFJJCTwyR{xj%N@gG zb+@Wiyt(Pwm%wsfjl*%`w|K@gDt;k)3JE!>xj=y*{gv zb&)7%I7jPH)BhSOJaLjfUaTIsD1H6PG+~ZiR zAJ-{42$C;tf*dy$$bh|qm}cb+JZbe8}4XV;Q7 zw>O9sK*atxi%;xr0{aWTe<$?O8=*Y(!1ua>DY*0~$6ohW=synpyIk3q_kizz`sn!? z^+x;umCnQV-v0G365uKJztH0UD^2i!g2(@F=I}qT<^QkSYHynTdH#MI^hf3liS{ef XbM=!xJt`v*0QexKC|U8&@XP-J4uUNO literal 0 HcmV?d00001 diff --git a/.dockerignore b/.dockerignore index 58df2a2c..81a371cb 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,7 +3,9 @@ .gitignore .github .gitattributes +.vscode .assets +hotio READMETEMPLATE.md README.md SECURITY.md diff --git a/.github/workflows/BuildImage.yml b/.github/workflows/BuildImage.yml index 5dc31a53..4de4566b 100644 --- a/.github/workflows/BuildImage.yml +++ b/.github/workflows/BuildImage.yml @@ -22,7 +22,7 @@ jobs: echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_OUTPUT echo "MULTI_ARCH=${{ env.MULTI_ARCH }}" >> $GITHUB_OUTPUT # **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. **** - MOD_VERSION=${GITHUB_SHA:0:7} + MOD_VERSION="2.7.1" echo "MOD_VERSION=${MOD_VERSION}" >> $GITHUB_OUTPUT outputs: GITHUB_REPO: ${{ steps.outputs.outputs.GITHUB_REPO }} diff --git a/Dockerfile b/Dockerfile index e6b09e66..b05466f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,6 @@ ## Buildstage ## FROM ghcr.io/linuxserver/baseimage-alpine:3.20 as buildstage - ARG MOD_VERSION # copy local files @@ -17,11 +16,14 @@ RUN \ ## Single layer deployed image ## FROM scratch +ARG MOD_VERSION -LABEL org.opencontainers.image.source=https://github.com/TheCaptain989/radarr-striptracks +LABEL org.opencontainers.image.title=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.version="${MOD_VERSION}" +LABEL org.opencontainers.image.source="https://github.com/TheCaptain989/radarr-striptracks" LABEL org.opencontainers.image.authors="TheCaptain989 " +LABEL org.opencontainers.image.licenses=GPL-3.0-only # Add files from buildstage COPY --from=buildstage /root-layer/ / diff --git a/README.md b/README.md index a30d014b..6c0d0044 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,18 @@ # About A [Docker Mod](https://github.com/linuxserver/docker-mods) for the LinuxServer.io Radarr/Sonarr v3 or higher Docker containers that adds a script to automatically strip out unwanted audio and subtitle tracks, keeping only the desired languages. -**Beginning with version 2.0 of this mod, it only supports v3 or later of Radarr/Sonarr. For legacy Radarr/Sonarr v2 please use mod release 1.3 or earlier** +**NEW!** There is a now an installer for **hotio** containers! See the [HOTIO.md](./hotio/HOTIO.md) file for more details. **This unified script works in both Radarr and Sonarr. Use this mod in either container!** >**NOTE:** This mod supports Linux OSes only. - + Production Container info: ![Docker Image Size](https://img.shields.io/docker/image-size/linuxserver/mods/radarr-striptracks "Container Size") [![linuxserver/docker-mods/mods/radarr-striptracks](https://img.shields.io/badge/dynamic/json?logo=github&url=https%3A%2F%2Fraw.githubusercontent.com%2Fthecaptain989%2Fghcr-pulls%2Fmaster%2Findex.json&query=%24%5B%3F(%40.owner%3D%3D%22linuxserver%22%20%26%26%20%40.repo%3D%3D%22docker-mods%22%20%26%26%20%40.image%3D%3D%22mods%22%20%26%26%20%40.tag%3D%3D%22radarr-striptracks%22)%5D.pulls&label=ghcr%20pulls&color=1572A4)](https://github.com/linuxserver/docker-mods/pkgs/container/mods) 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?logo=docker "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") + # 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: @@ -337,5 +338,8 @@ This would not be possible without the following: The AWK script parsing mkvmerge output is adapted from Endoro's post on [VideoHelp](https://forum.videohelp.com/threads/343271-BULK-remove-non-English-tracks-from-MKV-container#post2292889). Icons made by [Freepik](https://www.freepik.com) from [Flaticon](https://www.flaticon.com/) +## Legacy Change Notes +Beginning with version 2.0 of this mod, it only supports v3 or later of Radarr/Sonarr. For legacy Radarr/Sonarr v2 please use mod release 1.3 or earlier. + [warning]: .assets/warning.png "Warning" [danger]: .assets/danger.png "Danger" diff --git a/SECURITY.md b/SECURITY.md index 46cfa041..1c28230c 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,8 +6,8 @@ Only the latest major and minor version are supported. | Version | Supported | | ------- | ------------------ | -| 2.6.x | :heavy_check_mark: | -| < 2.6 | :x: | +| 2.7.x | :heavy_check_mark: | +| < 2.7 | :x: | ## Reporting a Vulnerability diff --git a/hotio/99-striptracks.sh b/hotio/99-striptracks.sh new file mode 100644 index 00000000..a8c33f3e --- /dev/null +++ b/hotio/99-striptracks.sh @@ -0,0 +1,87 @@ +#!/command/with-contenv bash +# shellcheck shell=bash + +# Custom script to install Striptracks Mod meant for Radarr or Sonarr Docker containers +# WARNING: Minimal error handling! + +# Pre-set LSIO Docker Mod variables +DOCKER_MODS=linuxserver/mods:radarr-striptracks +#DOCKER_MODS_DEBUG=true +export DOCKER_MODS +export DOCKER_MODS_DEBUG +[ "$DOCKER_MODS_DEBUG" = "true" ] && echo "[mod-install] DOCKER_MODS: $DOCKER_MODS" && echo "[mod-install] DOCKER_MODS_DEBUG: $DOCKER_MODS_DEBUG" +echo "[mod-install] installing $DOCKER_MODS mod" + +# Steal the current docker-mods version from the source +MODS_VERSION=$(curl -s --fail-with-body "https://raw.githubusercontent.com/linuxserver/docker-baseimage-alpine/master/Dockerfile" | sed -nr 's/^ARG MODS_VERSION="?([^"]+)"?/\1/p') +[ "$DOCKER_MODS_DEBUG" = "true" ] && echo "[mod-install] MODS_VERSION: $MODS_VERSION" + +# Download and execute the main docker-mods script to install the mod +# Very well thought out code, this. Why reinvent? +curl -s --fail-with-body -o /docker-mods "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" +ret=$? +[ $ret -ne 0 ] && echo "[mod-install] unable to download docker-mods: Exit code: $ret. Exiting." && exit 1 + +chmod +x /docker-mods + +. /docker-mods +[ $ret -ne 0 ] && echo "[mod-install] docker-mods installation error: $ret. Exiting." && exit 1 + +# Get script version from installed mod +VERSION=$(sed -nr 's/^export striptracks_ver="?([^"]+)"?/\1/p' /usr/local/bin/striptracks.sh) +[ "$DOCKER_MODS_DEBUG" = "true" ] && echo "[mod-install] striptracks.sh version: $VERSION" + +# Remaining setup that is normally done with s6-overlay init scripts, but that rely on a lot of Docker Mods dependencies +cat <>> Striptracks Mod by TheCaptain989 <<< +Repos: + Dev/test: https://github.com/TheCaptain989/radarr-striptracks + Prod: https://github.com/linuxserver/docker-mods/tree/radarr-striptracks + +Version: ${VERSION} +---------------- +EOF + +# Determine if setup is needed +if [ ! -f /usr/bin/mkvmerge ]; then + echo "[mod-install] Running first time setup." + + if [ -f /usr/bin/apt ]; then + # Ubuntu + echo "[mod-install] Installing MKVToolNix using apt-get" + apt-get update && \ + apt-get -y install mkvtoolnix && \ + rm -rf /var/lib/apt/lists/* + elif [ -f /sbin/apk ]; then + # Alpine + echo "[mod-install] Installing MKVToolNix using apk" + apk upgrade --no-cache && \ + apk add --no-cache mkvtoolnix && \ + rm -rf /var/lib/apt/lists/* + else + # Unknown + echo "[mod-install] Unknown package manager. Attempting to install MKVToolNix using apt-get" + apt-get update && \ + apt-get -y install mkvtoolnix && \ + rm -rf /var/lib/apt/lists/* + fi +fi + +# Check ownership and attributes on each script file +[ -z "$PUID" ] && owner_user="root" || owner_user="$PUID" +[ -z "$PGID" ] && owner_group="root" || owner_group="$PGID" +for file in /usr/local/bin/striptracks*.sh +do + # Change ownership + if [ "$(stat -c '%G' "$file")" != "$owner_group" ]; then + echo "[mod-install] Changing ownership on $file script to $owner_user:$owner_group." + chown "$owner_user":"$owner_group" "$file" + fi + + # Make executable + if [ ! -x "$file" ]; then + echo "[mod-install] Making $file script executable." + chmod +x "$file" + fi +done diff --git a/hotio/HOTIO.md b/hotio/HOTIO.md new file mode 100644 index 00000000..2e23cea7 --- /dev/null +++ b/hotio/HOTIO.md @@ -0,0 +1,86 @@ +# About +This mod can now be used with [hotio](https://hotio.dev/) containers by using the method described in the hotio [FAQ](https://hotio.dev/faq/#:~:text=I%20would%20like%20to%20execute%20my%20own%20scripts%20on%20startup%2C%20how%20would%20I%20do%20this%3F) to install it. +(This method relies on s6-overlay v2 behavior still working, though v3 is the current version.) + +>This is a quick and dirty script with minimal testing or error checking. Note that it only runs *inside* the hotio container. + +# Installation +1. Download the **[99-striptracks.sh](./99-striptracks.sh)** install script and save it somewhere that can be mounted by your container. + + *Example location:* `/volume1/docker/99-striptracks.sh` + + *Example curl line to download the installation script:* + + ```shell + curl -s https://raw.githubusercontent.com/TheCaptain989/radarr-striptracks/master/hotio/99-striptracks.sh >/volume1/docker/99-striptracks.sh + ``` + +2. Make it executable: + + ```shell + chmod +x /volume1/docker/99-striptracks.sh + ``` + +3. Pull your selected container ([hotio/radarr](https://github.com/orgs/hotio/packages/container/package/radarr "hotio's Radarr container") or [hotio/sonarr](https://github.com/orgs/hotio/packages/container/package/sonarr "hotio.io's Sonarr container")) from GitHub Container Registry or Docker Hub: + `docker pull ghcr.io/hotio/radarr:latest` OR + `docker pull ghcr.io/hotio/sonarr:latest` + +4. Configure the Docker container with all the port, volume, and environment settings from the *original container documentation* here: + **[hotio/radarr](https://hotio.dev/containers/radarr/ "Radarr Docker container")** + **[hotio/sonarr](https://hotio.dev/containers/sonarr/ "Sonarr Docker container")** + + >**Note:** Notice that no environment variables are used in this setup. That is a specific feature of LSIO containers and is not applicable to hotio containers. + + 1. Add the **99-striptracks.sh** file path as a mount point in your `compose.yml` file or `docker run` command. + >**Note:** The `/etc/cont-init.d/99-striptracks` path below is important; don't change it! + + *Example Docker Compose YAML Configuration* + + ```yaml + services: + sonarr: + container_name: sonarr + image: ghcr.io/hotio/sonarr + ports: + - "8989:8989" + environment: + - PUID=1000 + - PGID=1000 + - UMASK=002 + - TZ=Etc/UTC + volumes: + - /:/config + - /:/data + - /volume1/docker/99-striptracks.sh:/etc/cont-init.d/99-striptracks + ``` + + *Example Docker Run Command* + + ```shell + docker run --rm \ + --name sonarr \ + -p 8989:8989 \ + -e PUID=1000 \ + -e PGID=1000 \ + -e UMASK=002 \ + -e TZ="Etc/UTC" \ + -v /:/config \ + -v /:/data \ + -v /volume1/docker/99-striptracks.sh:/etc/cont-init.d/99-striptracks \ + ghcr.io/hotio/sonarr + ``` + + *Example Synology Configuration* + ![striptracks hotio](../.assets/hotio-striptracks-synology.png "Synology container settings") + + >**Note:** Please be sure that your mount points for `/config` and `/data` above do not overlap with the newly added mount point! + + 2. Start the container. + +5. After the container has fully started, continue with Installation step 3 in the previous [README](../README.md#installation). + +## Requirements +You must have the **bash** shell available in your host path. You *might* attempt editing the [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) in the 99-striptracks.sh script to get around this, but that is beyond the scope of this document. + +## Known Problems +On at least *some* Synology hosts that use the ash shell, this script will cause the container to abort and not start. If this happens, ***check your container logs*** for hints as to what may be wrong. diff --git a/root/usr/local/bin/striptracks.sh b/root/usr/local/bin/striptracks.sh index f257c129..08314b4e 100755 --- a/root/usr/local/bin/striptracks.sh +++ b/root/usr/local/bin/striptracks.sh @@ -809,6 +809,63 @@ function check_compat { [ $striptracks_debug -ge 1 ] && echo "Debug|Feature $1 is $([ $striptracks_return -eq 1 ] && echo "not ")compatible with ${striptracks_type^} v${striptracks_arr_version}." | log return $striptracks_return } +# Get media management configuration +function get_media_config { + local url="$striptracks_api_url/config/mediamanagement" + [ $striptracks_debug -ge 1 ] && echo "Debug|Getting ${striptracks_type^} configuration. Calling ${striptracks_type^} API using GET and URL '$url'" | log + unset striptracks_result + striptracks_result=$(curl -s --fail-with-body -H "X-Api-Key: $striptracks_apikey" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + --get "$url") + local striptracks_curlret=$?; [ $striptracks_curlret -ne 0 ] && { + local striptracks_message=$(echo -e "[$striptracks_curlret] curl error when calling: \"$url\"\nWeb server returned: $(echo $striptracks_result | jq -jcrM .message?)" | awk '{print "Error|"$0}') + echo "$striptracks_message" | log + echo "$striptracks_message" >&2 + } + [ $striptracks_debug -ge 2 ] && echo "API returned: $striptracks_result" | awk '{print "Debug|"$0}' | log + if [ "$(echo $striptracks_result | jq -crM '.id?')" != "null" ] && [ "$(echo $striptracks_result | jq -crM '.id?')" != "" ]; then + local striptracks_return=0 + else + local striptracks_return=1 + fi + return $striptracks_return +} +# Update file metadata in Radarr/Sonarr +function set_video_info { + local url="$striptracks_api_url/$striptracks_video_api/$striptracks_video_id" + local data="$(echo $striptracks_videoinfo | jq -crM .monitored='true')" + local i=0 + for ((i=1; i <= 5; i++)); do + [ $striptracks_debug -ge 1 ] && echo "Debug|Updating monitored to 'true'. Calling ${striptracks_type^} API using PUT and URL '$url' with data $data" | log + unset striptracks_result + striptracks_result=$(curl -s --fail-with-body -H "X-Api-Key: $striptracks_apikey" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d "$data" \ + -X PUT "$url") + local striptracks_curlret=$?; [ $striptracks_curlret -ne 0 ] && { + local striptracks_message=$(echo -e "[$striptracks_curlret] curl error when calling: \"$url\" with data $data\nWeb server returned: $(echo $striptracks_result | jq -jcrM .message?)" | awk '{print "Error|"$0}') + echo "$striptracks_message" | log + echo "$striptracks_message" >&2 + } + [ $striptracks_debug -ge 2 ] && echo "Debug|API returned ${#striptracks_result} bytes." | log + [ $striptracks_debug -ge 3 ] && echo "API returned: $striptracks_result" | awk '{print "Debug|"$0}' | log + # Exit loop if database is not locked, else wait 1 minute + if [[ ! "$(echo $striptracks_result | jq -jcrM .message?)" =~ database\ is\ locked ]]; then + break + else + echo "Warn|Database is locked; system is likely overloaded. Sleeping 1 minute." | log + sleep 60 + fi + done + if [ $striptracks_curlret -eq 0 -a "${#striptracks_result}" != 0 ]; then + local striptracks_return=0 + else + local striptracks_return=1 + fi + return $striptracks_return +} # Exit program function end_script { # Cool bash feature @@ -1140,6 +1197,20 @@ elif [ -n "$striptracks_api_url" ]; then echo "$striptracks_message" >&2 striptracks_exitstatus=17 fi + # Check if Radarr/Sonarr are configured to unmonitor deleted videos + get_media_config + striptracks_return=$?; [ $striptracks_return -ne 0 ] && { + # No '.id' in returned JSON + striptracks_message="Warn|The Media Management Config API returned no id." + echo "$striptracks_message" | log + echo "$striptracks_message" >&2 + striptracks_exitstatus=17 + } + if [ "$(echo "$striptracks_result" | jq -crM ".autoUnmonitorPreviouslyDownloaded${striptracks_video_api^}s")" = "true" ]; then + striptracks_conf_unmonitor=1 + striptracks_message="Warn|Will compensate for ${striptracks_type^} configuration to unmonitor deleted ${striptracks_video_api}s." + echo "$striptracks_message" | log + fi else # No URL means we can't call the API striptracks_message="Warn|Unable to determine ${striptracks_type^} API URL." @@ -1518,8 +1589,18 @@ elif [ -n "$striptracks_api_url" ]; then # Get new video file id if get_video_info; then - striptracks_videofile_id="$(echo $striptracks_result | jq -crM .${striptracks_json_quality_root}.id)" + striptracks_videoinfo="$striptracks_result" + striptracks_videofile_id="$(echo $striptracks_videoinfo | jq -crM .${striptracks_json_quality_root}.id)" [ $striptracks_debug -ge 1 ] && echo "Debug|Using new video file id '$striptracks_videofile_id'" | log + + # Check if video is unmonitored after the delete/import + if [ $striptracks_conf_unmonitor -eq 1 -a "$(echo "$striptracks_videoinfo" | jq -crM ".monitored")" = "false" ]; then + striptracks_message="Warn|'$striptracks_title' is unmonitored after deleting the original video. Compensating for ${striptracks_type^} configuration." + echo "$striptracks_message" | log + # Set video to monitored again + set_video_info + fi + # Get new video file info if get_videofile_info; then striptracks_videofile_info="$striptracks_result" From c52b87f3c1532562fa635e98d008a9596058d1cb Mon Sep 17 00:00:00 2001 From: TheCaptain989 Date: Thu, 15 Aug 2024 18:44:58 -0500 Subject: [PATCH 5/8] Revert "Release 2.7.1" This reverts commit 57888b41fe2d70c06f52fc85e0aaf64b0fcf7e04. --- .assets/hotio-striptracks-synology.png | Bin 15930 -> 0 bytes .dockerignore | 2 - .github/workflows/BuildImage.yml | 2 +- Dockerfile | 8 +-- README.md | 8 +-- SECURITY.md | 4 +- hotio/99-striptracks.sh | 87 ------------------------- hotio/HOTIO.md | 86 ------------------------ root/usr/local/bin/striptracks.sh | 83 +---------------------- 9 files changed, 9 insertions(+), 271 deletions(-) delete mode 100644 .assets/hotio-striptracks-synology.png delete mode 100644 hotio/99-striptracks.sh delete mode 100644 hotio/HOTIO.md diff --git a/.assets/hotio-striptracks-synology.png b/.assets/hotio-striptracks-synology.png deleted file mode 100644 index 2439429eae8880cd9fcee6fed8626b4a949f021d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15930 zcmbumby!qi_clHVh=_m)3P`C)cQ*r4N=r(2cXudCr*wnF&`5Vl=Kw=UOAcKF3^6e8 z;OBY1`FpSTj~~~?nX}K?XYaN5*?X;f-D{mNWkng>$1fiP007(%? zQO9x#(e)) z0{$Q=uI8zKu!QgVd^3~n*x*&*s|SgpZ^^$HYxeTEnRO9PwmI6h?D=hIgase!Rl6N& zl+``rRw^iNDKEEmSQ0K`c%{v>yyWKa`-WKy-Q9`G!(sN@(z|G7Uq<_?dSmPm44zM4 zLNVVtudLiyY-I{?xhQ@o91{>&0e7>*#)Ob#8CS4$xF0nCYv{EU7D`OO)AyK>D=}ncCS#qqojz7K?%@7e`=vHLlY^i=>Ddg6mK_{N_g3I0H4x9a04rbkK#0_ zKOOI?Yh57(@#mya!vEM4@*3#bx)Uy(?bLyMAEWb&UM7@uI&eFzJ$^=HBOPsn8rAr$ z)sjRzsTisYpvtL*;-td|I;FJ&;(IyYKj%U-fnq_YNdSSig5wI$k$w32dE2=KkZn0g znE#Y}q-Zu#9xJKb0TQNCl0axaR|U74n5j9#v1$8O9HL>12%Ya4cTm@RCxqPVwdMv8 z6$JPi3AL@}O5dI8)7Y7+Fc}+Gs{MWB$(K>)Yr6pJYZ}N}T;e;8Wi0 z(MXR$ZmdLSfu*y`F<*&;1GL06 zH+?->agfHQ7ONsN(0&)@ceAr}xPF!np%N?z)vflN_!?oQJ*O59PM4!PFA-xSD^wyc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Epdn}$^tl1n1A`Mx1C!kE<$3aKTqDSLTq z_uWe$n^~EJG*%6(C2*!$iN-@88YoUrnl|hB9|`EG2(G(5KYoCy|DOJ zcB_By4+cxNL93%&!`Vec1eh7ZDCYY0AvlS97EPZDOFwQ@{>@l~?LPHfPiL{SMnTl7 zc(qh=_^JP@IbC#@Zl2R2`i3N00(*Flaox25w$|-WRMOi*TxzBFJJCTwyR{xj%N@gG zb+@Wiyt(Pwm%wsfjl*%`w|K@gDt;k)3JE!>xj=y*{gv zb&)7%I7jPH)BhSOJaLjfUaTIsD1H6PG+~ZiR zAJ-{42$C;tf*dy$$bh|qm}cb+JZbe8}4XV;Q7 zw>O9sK*atxi%;xr0{aWTe<$?O8=*Y(!1ua>DY*0~$6ohW=synpyIk3q_kizz`sn!? z^+x;umCnQV-v0G365uKJztH0UD^2i!g2(@F=I}qT<^QkSYHynTdH#MI^hf3liS{ef XbM=!xJt`v*0QexKC|U8&@XP-J4uUNO diff --git a/.dockerignore b/.dockerignore index 81a371cb..58df2a2c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,9 +3,7 @@ .gitignore .github .gitattributes -.vscode .assets -hotio READMETEMPLATE.md README.md SECURITY.md diff --git a/.github/workflows/BuildImage.yml b/.github/workflows/BuildImage.yml index 4de4566b..5dc31a53 100644 --- a/.github/workflows/BuildImage.yml +++ b/.github/workflows/BuildImage.yml @@ -22,7 +22,7 @@ jobs: echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_OUTPUT echo "MULTI_ARCH=${{ env.MULTI_ARCH }}" >> $GITHUB_OUTPUT # **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. **** - MOD_VERSION="2.7.1" + MOD_VERSION=${GITHUB_SHA:0:7} echo "MOD_VERSION=${MOD_VERSION}" >> $GITHUB_OUTPUT outputs: GITHUB_REPO: ${{ steps.outputs.outputs.GITHUB_REPO }} diff --git a/Dockerfile b/Dockerfile index b05466f9..e6b09e66 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ ## Buildstage ## FROM ghcr.io/linuxserver/baseimage-alpine:3.20 as buildstage + ARG MOD_VERSION # copy local files @@ -16,14 +17,11 @@ RUN \ ## Single layer deployed image ## FROM scratch -ARG MOD_VERSION -LABEL org.opencontainers.image.title=radarr-striptracks +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.version="${MOD_VERSION}" -LABEL org.opencontainers.image.source="https://github.com/TheCaptain989/radarr-striptracks" -LABEL org.opencontainers.image.authors="TheCaptain989 " 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 6c0d0044..a30d014b 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,17 @@ # About A [Docker Mod](https://github.com/linuxserver/docker-mods) for the LinuxServer.io Radarr/Sonarr v3 or higher Docker containers that adds a script to automatically strip out unwanted audio and subtitle tracks, keeping only the desired languages. -**NEW!** There is a now an installer for **hotio** containers! See the [HOTIO.md](./hotio/HOTIO.md) file for more details. +**Beginning with version 2.0 of this mod, it only supports v3 or later of Radarr/Sonarr. For legacy Radarr/Sonarr v2 please use mod release 1.3 or earlier** **This unified script works in both Radarr and Sonarr. Use this mod in either container!** >**NOTE:** This mod supports Linux OSes only. - + Production Container info: ![Docker Image Size](https://img.shields.io/docker/image-size/linuxserver/mods/radarr-striptracks "Container Size") [![linuxserver/docker-mods/mods/radarr-striptracks](https://img.shields.io/badge/dynamic/json?logo=github&url=https%3A%2F%2Fraw.githubusercontent.com%2Fthecaptain989%2Fghcr-pulls%2Fmaster%2Findex.json&query=%24%5B%3F(%40.owner%3D%3D%22linuxserver%22%20%26%26%20%40.repo%3D%3D%22docker-mods%22%20%26%26%20%40.image%3D%3D%22mods%22%20%26%26%20%40.tag%3D%3D%22radarr-striptracks%22)%5D.pulls&label=ghcr%20pulls&color=1572A4)](https://github.com/linuxserver/docker-mods/pkgs/container/mods) 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?logo=docker "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") - # 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: @@ -338,8 +337,5 @@ This would not be possible without the following: The AWK script parsing mkvmerge output is adapted from Endoro's post on [VideoHelp](https://forum.videohelp.com/threads/343271-BULK-remove-non-English-tracks-from-MKV-container#post2292889). Icons made by [Freepik](https://www.freepik.com) from [Flaticon](https://www.flaticon.com/) -## Legacy Change Notes -Beginning with version 2.0 of this mod, it only supports v3 or later of Radarr/Sonarr. For legacy Radarr/Sonarr v2 please use mod release 1.3 or earlier. - [warning]: .assets/warning.png "Warning" [danger]: .assets/danger.png "Danger" diff --git a/SECURITY.md b/SECURITY.md index 1c28230c..46cfa041 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,8 +6,8 @@ Only the latest major and minor version are supported. | Version | Supported | | ------- | ------------------ | -| 2.7.x | :heavy_check_mark: | -| < 2.7 | :x: | +| 2.6.x | :heavy_check_mark: | +| < 2.6 | :x: | ## Reporting a Vulnerability diff --git a/hotio/99-striptracks.sh b/hotio/99-striptracks.sh deleted file mode 100644 index a8c33f3e..00000000 --- a/hotio/99-striptracks.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/command/with-contenv bash -# shellcheck shell=bash - -# Custom script to install Striptracks Mod meant for Radarr or Sonarr Docker containers -# WARNING: Minimal error handling! - -# Pre-set LSIO Docker Mod variables -DOCKER_MODS=linuxserver/mods:radarr-striptracks -#DOCKER_MODS_DEBUG=true -export DOCKER_MODS -export DOCKER_MODS_DEBUG -[ "$DOCKER_MODS_DEBUG" = "true" ] && echo "[mod-install] DOCKER_MODS: $DOCKER_MODS" && echo "[mod-install] DOCKER_MODS_DEBUG: $DOCKER_MODS_DEBUG" -echo "[mod-install] installing $DOCKER_MODS mod" - -# Steal the current docker-mods version from the source -MODS_VERSION=$(curl -s --fail-with-body "https://raw.githubusercontent.com/linuxserver/docker-baseimage-alpine/master/Dockerfile" | sed -nr 's/^ARG MODS_VERSION="?([^"]+)"?/\1/p') -[ "$DOCKER_MODS_DEBUG" = "true" ] && echo "[mod-install] MODS_VERSION: $MODS_VERSION" - -# Download and execute the main docker-mods script to install the mod -# Very well thought out code, this. Why reinvent? -curl -s --fail-with-body -o /docker-mods "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" -ret=$? -[ $ret -ne 0 ] && echo "[mod-install] unable to download docker-mods: Exit code: $ret. Exiting." && exit 1 - -chmod +x /docker-mods - -. /docker-mods -[ $ret -ne 0 ] && echo "[mod-install] docker-mods installation error: $ret. Exiting." && exit 1 - -# Get script version from installed mod -VERSION=$(sed -nr 's/^export striptracks_ver="?([^"]+)"?/\1/p' /usr/local/bin/striptracks.sh) -[ "$DOCKER_MODS_DEBUG" = "true" ] && echo "[mod-install] striptracks.sh version: $VERSION" - -# Remaining setup that is normally done with s6-overlay init scripts, but that rely on a lot of Docker Mods dependencies -cat <>> Striptracks Mod by TheCaptain989 <<< -Repos: - Dev/test: https://github.com/TheCaptain989/radarr-striptracks - Prod: https://github.com/linuxserver/docker-mods/tree/radarr-striptracks - -Version: ${VERSION} ----------------- -EOF - -# Determine if setup is needed -if [ ! -f /usr/bin/mkvmerge ]; then - echo "[mod-install] Running first time setup." - - if [ -f /usr/bin/apt ]; then - # Ubuntu - echo "[mod-install] Installing MKVToolNix using apt-get" - apt-get update && \ - apt-get -y install mkvtoolnix && \ - rm -rf /var/lib/apt/lists/* - elif [ -f /sbin/apk ]; then - # Alpine - echo "[mod-install] Installing MKVToolNix using apk" - apk upgrade --no-cache && \ - apk add --no-cache mkvtoolnix && \ - rm -rf /var/lib/apt/lists/* - else - # Unknown - echo "[mod-install] Unknown package manager. Attempting to install MKVToolNix using apt-get" - apt-get update && \ - apt-get -y install mkvtoolnix && \ - rm -rf /var/lib/apt/lists/* - fi -fi - -# Check ownership and attributes on each script file -[ -z "$PUID" ] && owner_user="root" || owner_user="$PUID" -[ -z "$PGID" ] && owner_group="root" || owner_group="$PGID" -for file in /usr/local/bin/striptracks*.sh -do - # Change ownership - if [ "$(stat -c '%G' "$file")" != "$owner_group" ]; then - echo "[mod-install] Changing ownership on $file script to $owner_user:$owner_group." - chown "$owner_user":"$owner_group" "$file" - fi - - # Make executable - if [ ! -x "$file" ]; then - echo "[mod-install] Making $file script executable." - chmod +x "$file" - fi -done diff --git a/hotio/HOTIO.md b/hotio/HOTIO.md deleted file mode 100644 index 2e23cea7..00000000 --- a/hotio/HOTIO.md +++ /dev/null @@ -1,86 +0,0 @@ -# About -This mod can now be used with [hotio](https://hotio.dev/) containers by using the method described in the hotio [FAQ](https://hotio.dev/faq/#:~:text=I%20would%20like%20to%20execute%20my%20own%20scripts%20on%20startup%2C%20how%20would%20I%20do%20this%3F) to install it. -(This method relies on s6-overlay v2 behavior still working, though v3 is the current version.) - ->This is a quick and dirty script with minimal testing or error checking. Note that it only runs *inside* the hotio container. - -# Installation -1. Download the **[99-striptracks.sh](./99-striptracks.sh)** install script and save it somewhere that can be mounted by your container. - - *Example location:* `/volume1/docker/99-striptracks.sh` - - *Example curl line to download the installation script:* - - ```shell - curl -s https://raw.githubusercontent.com/TheCaptain989/radarr-striptracks/master/hotio/99-striptracks.sh >/volume1/docker/99-striptracks.sh - ``` - -2. Make it executable: - - ```shell - chmod +x /volume1/docker/99-striptracks.sh - ``` - -3. Pull your selected container ([hotio/radarr](https://github.com/orgs/hotio/packages/container/package/radarr "hotio's Radarr container") or [hotio/sonarr](https://github.com/orgs/hotio/packages/container/package/sonarr "hotio.io's Sonarr container")) from GitHub Container Registry or Docker Hub: - `docker pull ghcr.io/hotio/radarr:latest` OR - `docker pull ghcr.io/hotio/sonarr:latest` - -4. Configure the Docker container with all the port, volume, and environment settings from the *original container documentation* here: - **[hotio/radarr](https://hotio.dev/containers/radarr/ "Radarr Docker container")** - **[hotio/sonarr](https://hotio.dev/containers/sonarr/ "Sonarr Docker container")** - - >**Note:** Notice that no environment variables are used in this setup. That is a specific feature of LSIO containers and is not applicable to hotio containers. - - 1. Add the **99-striptracks.sh** file path as a mount point in your `compose.yml` file or `docker run` command. - >**Note:** The `/etc/cont-init.d/99-striptracks` path below is important; don't change it! - - *Example Docker Compose YAML Configuration* - - ```yaml - services: - sonarr: - container_name: sonarr - image: ghcr.io/hotio/sonarr - ports: - - "8989:8989" - environment: - - PUID=1000 - - PGID=1000 - - UMASK=002 - - TZ=Etc/UTC - volumes: - - /:/config - - /:/data - - /volume1/docker/99-striptracks.sh:/etc/cont-init.d/99-striptracks - ``` - - *Example Docker Run Command* - - ```shell - docker run --rm \ - --name sonarr \ - -p 8989:8989 \ - -e PUID=1000 \ - -e PGID=1000 \ - -e UMASK=002 \ - -e TZ="Etc/UTC" \ - -v /:/config \ - -v /:/data \ - -v /volume1/docker/99-striptracks.sh:/etc/cont-init.d/99-striptracks \ - ghcr.io/hotio/sonarr - ``` - - *Example Synology Configuration* - ![striptracks hotio](../.assets/hotio-striptracks-synology.png "Synology container settings") - - >**Note:** Please be sure that your mount points for `/config` and `/data` above do not overlap with the newly added mount point! - - 2. Start the container. - -5. After the container has fully started, continue with Installation step 3 in the previous [README](../README.md#installation). - -## Requirements -You must have the **bash** shell available in your host path. You *might* attempt editing the [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) in the 99-striptracks.sh script to get around this, but that is beyond the scope of this document. - -## Known Problems -On at least *some* Synology hosts that use the ash shell, this script will cause the container to abort and not start. If this happens, ***check your container logs*** for hints as to what may be wrong. diff --git a/root/usr/local/bin/striptracks.sh b/root/usr/local/bin/striptracks.sh index 08314b4e..f257c129 100755 --- a/root/usr/local/bin/striptracks.sh +++ b/root/usr/local/bin/striptracks.sh @@ -809,63 +809,6 @@ function check_compat { [ $striptracks_debug -ge 1 ] && echo "Debug|Feature $1 is $([ $striptracks_return -eq 1 ] && echo "not ")compatible with ${striptracks_type^} v${striptracks_arr_version}." | log return $striptracks_return } -# Get media management configuration -function get_media_config { - local url="$striptracks_api_url/config/mediamanagement" - [ $striptracks_debug -ge 1 ] && echo "Debug|Getting ${striptracks_type^} configuration. Calling ${striptracks_type^} API using GET and URL '$url'" | log - unset striptracks_result - striptracks_result=$(curl -s --fail-with-body -H "X-Api-Key: $striptracks_apikey" \ - -H "Content-Type: application/json" \ - -H "Accept: application/json" \ - --get "$url") - local striptracks_curlret=$?; [ $striptracks_curlret -ne 0 ] && { - local striptracks_message=$(echo -e "[$striptracks_curlret] curl error when calling: \"$url\"\nWeb server returned: $(echo $striptracks_result | jq -jcrM .message?)" | awk '{print "Error|"$0}') - echo "$striptracks_message" | log - echo "$striptracks_message" >&2 - } - [ $striptracks_debug -ge 2 ] && echo "API returned: $striptracks_result" | awk '{print "Debug|"$0}' | log - if [ "$(echo $striptracks_result | jq -crM '.id?')" != "null" ] && [ "$(echo $striptracks_result | jq -crM '.id?')" != "" ]; then - local striptracks_return=0 - else - local striptracks_return=1 - fi - return $striptracks_return -} -# Update file metadata in Radarr/Sonarr -function set_video_info { - local url="$striptracks_api_url/$striptracks_video_api/$striptracks_video_id" - local data="$(echo $striptracks_videoinfo | jq -crM .monitored='true')" - local i=0 - for ((i=1; i <= 5; i++)); do - [ $striptracks_debug -ge 1 ] && echo "Debug|Updating monitored to 'true'. Calling ${striptracks_type^} API using PUT and URL '$url' with data $data" | log - unset striptracks_result - striptracks_result=$(curl -s --fail-with-body -H "X-Api-Key: $striptracks_apikey" \ - -H "Content-Type: application/json" \ - -H "Accept: application/json" \ - -d "$data" \ - -X PUT "$url") - local striptracks_curlret=$?; [ $striptracks_curlret -ne 0 ] && { - local striptracks_message=$(echo -e "[$striptracks_curlret] curl error when calling: \"$url\" with data $data\nWeb server returned: $(echo $striptracks_result | jq -jcrM .message?)" | awk '{print "Error|"$0}') - echo "$striptracks_message" | log - echo "$striptracks_message" >&2 - } - [ $striptracks_debug -ge 2 ] && echo "Debug|API returned ${#striptracks_result} bytes." | log - [ $striptracks_debug -ge 3 ] && echo "API returned: $striptracks_result" | awk '{print "Debug|"$0}' | log - # Exit loop if database is not locked, else wait 1 minute - if [[ ! "$(echo $striptracks_result | jq -jcrM .message?)" =~ database\ is\ locked ]]; then - break - else - echo "Warn|Database is locked; system is likely overloaded. Sleeping 1 minute." | log - sleep 60 - fi - done - if [ $striptracks_curlret -eq 0 -a "${#striptracks_result}" != 0 ]; then - local striptracks_return=0 - else - local striptracks_return=1 - fi - return $striptracks_return -} # Exit program function end_script { # Cool bash feature @@ -1197,20 +1140,6 @@ elif [ -n "$striptracks_api_url" ]; then echo "$striptracks_message" >&2 striptracks_exitstatus=17 fi - # Check if Radarr/Sonarr are configured to unmonitor deleted videos - get_media_config - striptracks_return=$?; [ $striptracks_return -ne 0 ] && { - # No '.id' in returned JSON - striptracks_message="Warn|The Media Management Config API returned no id." - echo "$striptracks_message" | log - echo "$striptracks_message" >&2 - striptracks_exitstatus=17 - } - if [ "$(echo "$striptracks_result" | jq -crM ".autoUnmonitorPreviouslyDownloaded${striptracks_video_api^}s")" = "true" ]; then - striptracks_conf_unmonitor=1 - striptracks_message="Warn|Will compensate for ${striptracks_type^} configuration to unmonitor deleted ${striptracks_video_api}s." - echo "$striptracks_message" | log - fi else # No URL means we can't call the API striptracks_message="Warn|Unable to determine ${striptracks_type^} API URL." @@ -1589,18 +1518,8 @@ elif [ -n "$striptracks_api_url" ]; then # Get new video file id if get_video_info; then - striptracks_videoinfo="$striptracks_result" - striptracks_videofile_id="$(echo $striptracks_videoinfo | jq -crM .${striptracks_json_quality_root}.id)" + striptracks_videofile_id="$(echo $striptracks_result | jq -crM .${striptracks_json_quality_root}.id)" [ $striptracks_debug -ge 1 ] && echo "Debug|Using new video file id '$striptracks_videofile_id'" | log - - # Check if video is unmonitored after the delete/import - if [ $striptracks_conf_unmonitor -eq 1 -a "$(echo "$striptracks_videoinfo" | jq -crM ".monitored")" = "false" ]; then - striptracks_message="Warn|'$striptracks_title' is unmonitored after deleting the original video. Compensating for ${striptracks_type^} configuration." - echo "$striptracks_message" | log - # Set video to monitored again - set_video_info - fi - # Get new video file info if get_videofile_info; then striptracks_videofile_info="$striptracks_result" From d6d6f069f3a38ce58308534a690d2dd664414766 Mon Sep 17 00:00:00 2001 From: TheCaptain989 Date: Thu, 15 Aug 2024 18:51:17 -0500 Subject: [PATCH 6/8] Release 2.7.1 # What's Changed - **New** Uses semantic versioning - **New** Added installation script and documentation for hotio containers - **Fixes** TheCaptain989/radarr-striptracks#73 - Light editing of README - Added GHCR pull counts - Updated Docker image labeling --- .assets/hotio-striptracks-synology.png | Bin 0 -> 15930 bytes .dockerignore | 2 + .github/workflows/BuildImage.yml | 2 +- Dockerfile | 8 ++- README.md | 8 ++- SECURITY.md | 4 +- hotio/99-striptracks.sh | 87 +++++++++++++++++++++++++ hotio/HOTIO.md | 86 ++++++++++++++++++++++++ root/usr/local/bin/striptracks.sh | 83 ++++++++++++++++++++++- 9 files changed, 271 insertions(+), 9 deletions(-) create mode 100644 .assets/hotio-striptracks-synology.png create mode 100644 hotio/99-striptracks.sh create mode 100644 hotio/HOTIO.md diff --git a/.assets/hotio-striptracks-synology.png b/.assets/hotio-striptracks-synology.png new file mode 100644 index 0000000000000000000000000000000000000000..2439429eae8880cd9fcee6fed8626b4a949f021d GIT binary patch literal 15930 zcmbumby!qi_clHVh=_m)3P`C)cQ*r4N=r(2cXudCr*wnF&`5Vl=Kw=UOAcKF3^6e8 z;OBY1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8=*Y(!1ua>DY*0~$6ohW=synpyIk3q_kizz`sn!? z^+x;umCnQV-v0G365uKJztH0UD^2i!g2(@F=I}qT<^QkSYHynTdH#MI^hf3liS{ef XbM=!xJt`v*0QexKC|U8&@XP-J4uUNO literal 0 HcmV?d00001 diff --git a/.dockerignore b/.dockerignore index 58df2a2c..81a371cb 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,7 +3,9 @@ .gitignore .github .gitattributes +.vscode .assets +hotio READMETEMPLATE.md README.md SECURITY.md diff --git a/.github/workflows/BuildImage.yml b/.github/workflows/BuildImage.yml index 5dc31a53..4de4566b 100644 --- a/.github/workflows/BuildImage.yml +++ b/.github/workflows/BuildImage.yml @@ -22,7 +22,7 @@ jobs: echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_OUTPUT echo "MULTI_ARCH=${{ env.MULTI_ARCH }}" >> $GITHUB_OUTPUT # **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. **** - MOD_VERSION=${GITHUB_SHA:0:7} + MOD_VERSION="2.7.1" echo "MOD_VERSION=${MOD_VERSION}" >> $GITHUB_OUTPUT outputs: GITHUB_REPO: ${{ steps.outputs.outputs.GITHUB_REPO }} diff --git a/Dockerfile b/Dockerfile index e6b09e66..b05466f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,6 @@ ## Buildstage ## FROM ghcr.io/linuxserver/baseimage-alpine:3.20 as buildstage - ARG MOD_VERSION # copy local files @@ -17,11 +16,14 @@ RUN \ ## Single layer deployed image ## FROM scratch +ARG MOD_VERSION -LABEL org.opencontainers.image.source=https://github.com/TheCaptain989/radarr-striptracks +LABEL org.opencontainers.image.title=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.version="${MOD_VERSION}" +LABEL org.opencontainers.image.source="https://github.com/TheCaptain989/radarr-striptracks" LABEL org.opencontainers.image.authors="TheCaptain989 " +LABEL org.opencontainers.image.licenses=GPL-3.0-only # Add files from buildstage COPY --from=buildstage /root-layer/ / diff --git a/README.md b/README.md index a30d014b..6c0d0044 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,18 @@ # About A [Docker Mod](https://github.com/linuxserver/docker-mods) for the LinuxServer.io Radarr/Sonarr v3 or higher Docker containers that adds a script to automatically strip out unwanted audio and subtitle tracks, keeping only the desired languages. -**Beginning with version 2.0 of this mod, it only supports v3 or later of Radarr/Sonarr. For legacy Radarr/Sonarr v2 please use mod release 1.3 or earlier** +**NEW!** There is a now an installer for **hotio** containers! See the [HOTIO.md](./hotio/HOTIO.md) file for more details. **This unified script works in both Radarr and Sonarr. Use this mod in either container!** >**NOTE:** This mod supports Linux OSes only. - + Production Container info: ![Docker Image Size](https://img.shields.io/docker/image-size/linuxserver/mods/radarr-striptracks "Container Size") [![linuxserver/docker-mods/mods/radarr-striptracks](https://img.shields.io/badge/dynamic/json?logo=github&url=https%3A%2F%2Fraw.githubusercontent.com%2Fthecaptain989%2Fghcr-pulls%2Fmaster%2Findex.json&query=%24%5B%3F(%40.owner%3D%3D%22linuxserver%22%20%26%26%20%40.repo%3D%3D%22docker-mods%22%20%26%26%20%40.image%3D%3D%22mods%22%20%26%26%20%40.tag%3D%3D%22radarr-striptracks%22)%5D.pulls&label=ghcr%20pulls&color=1572A4)](https://github.com/linuxserver/docker-mods/pkgs/container/mods) 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?logo=docker "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") + # 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: @@ -337,5 +338,8 @@ This would not be possible without the following: The AWK script parsing mkvmerge output is adapted from Endoro's post on [VideoHelp](https://forum.videohelp.com/threads/343271-BULK-remove-non-English-tracks-from-MKV-container#post2292889). Icons made by [Freepik](https://www.freepik.com) from [Flaticon](https://www.flaticon.com/) +## Legacy Change Notes +Beginning with version 2.0 of this mod, it only supports v3 or later of Radarr/Sonarr. For legacy Radarr/Sonarr v2 please use mod release 1.3 or earlier. + [warning]: .assets/warning.png "Warning" [danger]: .assets/danger.png "Danger" diff --git a/SECURITY.md b/SECURITY.md index 46cfa041..1c28230c 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,8 +6,8 @@ Only the latest major and minor version are supported. | Version | Supported | | ------- | ------------------ | -| 2.6.x | :heavy_check_mark: | -| < 2.6 | :x: | +| 2.7.x | :heavy_check_mark: | +| < 2.7 | :x: | ## Reporting a Vulnerability diff --git a/hotio/99-striptracks.sh b/hotio/99-striptracks.sh new file mode 100644 index 00000000..a8c33f3e --- /dev/null +++ b/hotio/99-striptracks.sh @@ -0,0 +1,87 @@ +#!/command/with-contenv bash +# shellcheck shell=bash + +# Custom script to install Striptracks Mod meant for Radarr or Sonarr Docker containers +# WARNING: Minimal error handling! + +# Pre-set LSIO Docker Mod variables +DOCKER_MODS=linuxserver/mods:radarr-striptracks +#DOCKER_MODS_DEBUG=true +export DOCKER_MODS +export DOCKER_MODS_DEBUG +[ "$DOCKER_MODS_DEBUG" = "true" ] && echo "[mod-install] DOCKER_MODS: $DOCKER_MODS" && echo "[mod-install] DOCKER_MODS_DEBUG: $DOCKER_MODS_DEBUG" +echo "[mod-install] installing $DOCKER_MODS mod" + +# Steal the current docker-mods version from the source +MODS_VERSION=$(curl -s --fail-with-body "https://raw.githubusercontent.com/linuxserver/docker-baseimage-alpine/master/Dockerfile" | sed -nr 's/^ARG MODS_VERSION="?([^"]+)"?/\1/p') +[ "$DOCKER_MODS_DEBUG" = "true" ] && echo "[mod-install] MODS_VERSION: $MODS_VERSION" + +# Download and execute the main docker-mods script to install the mod +# Very well thought out code, this. Why reinvent? +curl -s --fail-with-body -o /docker-mods "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" +ret=$? +[ $ret -ne 0 ] && echo "[mod-install] unable to download docker-mods: Exit code: $ret. Exiting." && exit 1 + +chmod +x /docker-mods + +. /docker-mods +[ $ret -ne 0 ] && echo "[mod-install] docker-mods installation error: $ret. Exiting." && exit 1 + +# Get script version from installed mod +VERSION=$(sed -nr 's/^export striptracks_ver="?([^"]+)"?/\1/p' /usr/local/bin/striptracks.sh) +[ "$DOCKER_MODS_DEBUG" = "true" ] && echo "[mod-install] striptracks.sh version: $VERSION" + +# Remaining setup that is normally done with s6-overlay init scripts, but that rely on a lot of Docker Mods dependencies +cat <>> Striptracks Mod by TheCaptain989 <<< +Repos: + Dev/test: https://github.com/TheCaptain989/radarr-striptracks + Prod: https://github.com/linuxserver/docker-mods/tree/radarr-striptracks + +Version: ${VERSION} +---------------- +EOF + +# Determine if setup is needed +if [ ! -f /usr/bin/mkvmerge ]; then + echo "[mod-install] Running first time setup." + + if [ -f /usr/bin/apt ]; then + # Ubuntu + echo "[mod-install] Installing MKVToolNix using apt-get" + apt-get update && \ + apt-get -y install mkvtoolnix && \ + rm -rf /var/lib/apt/lists/* + elif [ -f /sbin/apk ]; then + # Alpine + echo "[mod-install] Installing MKVToolNix using apk" + apk upgrade --no-cache && \ + apk add --no-cache mkvtoolnix && \ + rm -rf /var/lib/apt/lists/* + else + # Unknown + echo "[mod-install] Unknown package manager. Attempting to install MKVToolNix using apt-get" + apt-get update && \ + apt-get -y install mkvtoolnix && \ + rm -rf /var/lib/apt/lists/* + fi +fi + +# Check ownership and attributes on each script file +[ -z "$PUID" ] && owner_user="root" || owner_user="$PUID" +[ -z "$PGID" ] && owner_group="root" || owner_group="$PGID" +for file in /usr/local/bin/striptracks*.sh +do + # Change ownership + if [ "$(stat -c '%G' "$file")" != "$owner_group" ]; then + echo "[mod-install] Changing ownership on $file script to $owner_user:$owner_group." + chown "$owner_user":"$owner_group" "$file" + fi + + # Make executable + if [ ! -x "$file" ]; then + echo "[mod-install] Making $file script executable." + chmod +x "$file" + fi +done diff --git a/hotio/HOTIO.md b/hotio/HOTIO.md new file mode 100644 index 00000000..2e23cea7 --- /dev/null +++ b/hotio/HOTIO.md @@ -0,0 +1,86 @@ +# About +This mod can now be used with [hotio](https://hotio.dev/) containers by using the method described in the hotio [FAQ](https://hotio.dev/faq/#:~:text=I%20would%20like%20to%20execute%20my%20own%20scripts%20on%20startup%2C%20how%20would%20I%20do%20this%3F) to install it. +(This method relies on s6-overlay v2 behavior still working, though v3 is the current version.) + +>This is a quick and dirty script with minimal testing or error checking. Note that it only runs *inside* the hotio container. + +# Installation +1. Download the **[99-striptracks.sh](./99-striptracks.sh)** install script and save it somewhere that can be mounted by your container. + + *Example location:* `/volume1/docker/99-striptracks.sh` + + *Example curl line to download the installation script:* + + ```shell + curl -s https://raw.githubusercontent.com/TheCaptain989/radarr-striptracks/master/hotio/99-striptracks.sh >/volume1/docker/99-striptracks.sh + ``` + +2. Make it executable: + + ```shell + chmod +x /volume1/docker/99-striptracks.sh + ``` + +3. Pull your selected container ([hotio/radarr](https://github.com/orgs/hotio/packages/container/package/radarr "hotio's Radarr container") or [hotio/sonarr](https://github.com/orgs/hotio/packages/container/package/sonarr "hotio.io's Sonarr container")) from GitHub Container Registry or Docker Hub: + `docker pull ghcr.io/hotio/radarr:latest` OR + `docker pull ghcr.io/hotio/sonarr:latest` + +4. Configure the Docker container with all the port, volume, and environment settings from the *original container documentation* here: + **[hotio/radarr](https://hotio.dev/containers/radarr/ "Radarr Docker container")** + **[hotio/sonarr](https://hotio.dev/containers/sonarr/ "Sonarr Docker container")** + + >**Note:** Notice that no environment variables are used in this setup. That is a specific feature of LSIO containers and is not applicable to hotio containers. + + 1. Add the **99-striptracks.sh** file path as a mount point in your `compose.yml` file or `docker run` command. + >**Note:** The `/etc/cont-init.d/99-striptracks` path below is important; don't change it! + + *Example Docker Compose YAML Configuration* + + ```yaml + services: + sonarr: + container_name: sonarr + image: ghcr.io/hotio/sonarr + ports: + - "8989:8989" + environment: + - PUID=1000 + - PGID=1000 + - UMASK=002 + - TZ=Etc/UTC + volumes: + - /:/config + - /:/data + - /volume1/docker/99-striptracks.sh:/etc/cont-init.d/99-striptracks + ``` + + *Example Docker Run Command* + + ```shell + docker run --rm \ + --name sonarr \ + -p 8989:8989 \ + -e PUID=1000 \ + -e PGID=1000 \ + -e UMASK=002 \ + -e TZ="Etc/UTC" \ + -v /:/config \ + -v /:/data \ + -v /volume1/docker/99-striptracks.sh:/etc/cont-init.d/99-striptracks \ + ghcr.io/hotio/sonarr + ``` + + *Example Synology Configuration* + ![striptracks hotio](../.assets/hotio-striptracks-synology.png "Synology container settings") + + >**Note:** Please be sure that your mount points for `/config` and `/data` above do not overlap with the newly added mount point! + + 2. Start the container. + +5. After the container has fully started, continue with Installation step 3 in the previous [README](../README.md#installation). + +## Requirements +You must have the **bash** shell available in your host path. You *might* attempt editing the [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) in the 99-striptracks.sh script to get around this, but that is beyond the scope of this document. + +## Known Problems +On at least *some* Synology hosts that use the ash shell, this script will cause the container to abort and not start. If this happens, ***check your container logs*** for hints as to what may be wrong. diff --git a/root/usr/local/bin/striptracks.sh b/root/usr/local/bin/striptracks.sh index f257c129..08314b4e 100755 --- a/root/usr/local/bin/striptracks.sh +++ b/root/usr/local/bin/striptracks.sh @@ -809,6 +809,63 @@ function check_compat { [ $striptracks_debug -ge 1 ] && echo "Debug|Feature $1 is $([ $striptracks_return -eq 1 ] && echo "not ")compatible with ${striptracks_type^} v${striptracks_arr_version}." | log return $striptracks_return } +# Get media management configuration +function get_media_config { + local url="$striptracks_api_url/config/mediamanagement" + [ $striptracks_debug -ge 1 ] && echo "Debug|Getting ${striptracks_type^} configuration. Calling ${striptracks_type^} API using GET and URL '$url'" | log + unset striptracks_result + striptracks_result=$(curl -s --fail-with-body -H "X-Api-Key: $striptracks_apikey" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + --get "$url") + local striptracks_curlret=$?; [ $striptracks_curlret -ne 0 ] && { + local striptracks_message=$(echo -e "[$striptracks_curlret] curl error when calling: \"$url\"\nWeb server returned: $(echo $striptracks_result | jq -jcrM .message?)" | awk '{print "Error|"$0}') + echo "$striptracks_message" | log + echo "$striptracks_message" >&2 + } + [ $striptracks_debug -ge 2 ] && echo "API returned: $striptracks_result" | awk '{print "Debug|"$0}' | log + if [ "$(echo $striptracks_result | jq -crM '.id?')" != "null" ] && [ "$(echo $striptracks_result | jq -crM '.id?')" != "" ]; then + local striptracks_return=0 + else + local striptracks_return=1 + fi + return $striptracks_return +} +# Update file metadata in Radarr/Sonarr +function set_video_info { + local url="$striptracks_api_url/$striptracks_video_api/$striptracks_video_id" + local data="$(echo $striptracks_videoinfo | jq -crM .monitored='true')" + local i=0 + for ((i=1; i <= 5; i++)); do + [ $striptracks_debug -ge 1 ] && echo "Debug|Updating monitored to 'true'. Calling ${striptracks_type^} API using PUT and URL '$url' with data $data" | log + unset striptracks_result + striptracks_result=$(curl -s --fail-with-body -H "X-Api-Key: $striptracks_apikey" \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -d "$data" \ + -X PUT "$url") + local striptracks_curlret=$?; [ $striptracks_curlret -ne 0 ] && { + local striptracks_message=$(echo -e "[$striptracks_curlret] curl error when calling: \"$url\" with data $data\nWeb server returned: $(echo $striptracks_result | jq -jcrM .message?)" | awk '{print "Error|"$0}') + echo "$striptracks_message" | log + echo "$striptracks_message" >&2 + } + [ $striptracks_debug -ge 2 ] && echo "Debug|API returned ${#striptracks_result} bytes." | log + [ $striptracks_debug -ge 3 ] && echo "API returned: $striptracks_result" | awk '{print "Debug|"$0}' | log + # Exit loop if database is not locked, else wait 1 minute + if [[ ! "$(echo $striptracks_result | jq -jcrM .message?)" =~ database\ is\ locked ]]; then + break + else + echo "Warn|Database is locked; system is likely overloaded. Sleeping 1 minute." | log + sleep 60 + fi + done + if [ $striptracks_curlret -eq 0 -a "${#striptracks_result}" != 0 ]; then + local striptracks_return=0 + else + local striptracks_return=1 + fi + return $striptracks_return +} # Exit program function end_script { # Cool bash feature @@ -1140,6 +1197,20 @@ elif [ -n "$striptracks_api_url" ]; then echo "$striptracks_message" >&2 striptracks_exitstatus=17 fi + # Check if Radarr/Sonarr are configured to unmonitor deleted videos + get_media_config + striptracks_return=$?; [ $striptracks_return -ne 0 ] && { + # No '.id' in returned JSON + striptracks_message="Warn|The Media Management Config API returned no id." + echo "$striptracks_message" | log + echo "$striptracks_message" >&2 + striptracks_exitstatus=17 + } + if [ "$(echo "$striptracks_result" | jq -crM ".autoUnmonitorPreviouslyDownloaded${striptracks_video_api^}s")" = "true" ]; then + striptracks_conf_unmonitor=1 + striptracks_message="Warn|Will compensate for ${striptracks_type^} configuration to unmonitor deleted ${striptracks_video_api}s." + echo "$striptracks_message" | log + fi else # No URL means we can't call the API striptracks_message="Warn|Unable to determine ${striptracks_type^} API URL." @@ -1518,8 +1589,18 @@ elif [ -n "$striptracks_api_url" ]; then # Get new video file id if get_video_info; then - striptracks_videofile_id="$(echo $striptracks_result | jq -crM .${striptracks_json_quality_root}.id)" + striptracks_videoinfo="$striptracks_result" + striptracks_videofile_id="$(echo $striptracks_videoinfo | jq -crM .${striptracks_json_quality_root}.id)" [ $striptracks_debug -ge 1 ] && echo "Debug|Using new video file id '$striptracks_videofile_id'" | log + + # Check if video is unmonitored after the delete/import + if [ $striptracks_conf_unmonitor -eq 1 -a "$(echo "$striptracks_videoinfo" | jq -crM ".monitored")" = "false" ]; then + striptracks_message="Warn|'$striptracks_title' is unmonitored after deleting the original video. Compensating for ${striptracks_type^} configuration." + echo "$striptracks_message" | log + # Set video to monitored again + set_video_info + fi + # Get new video file info if get_videofile_info; then striptracks_videofile_info="$striptracks_result" From 4502ff7c68804c797a61165ef3f7d557650e65bd Mon Sep 17 00:00:00 2001 From: TheCaptain989 Date: Mon, 19 Aug 2024 20:28:06 -0500 Subject: [PATCH 7/8] Removed references to hotio --- .assets/hotio-striptracks-synology.png | Bin 15930 -> 0 bytes README.md | 2 - hotio/99-striptracks.sh | 87 ------------------------- hotio/HOTIO.md | 86 ------------------------ 4 files changed, 175 deletions(-) delete mode 100644 .assets/hotio-striptracks-synology.png delete mode 100644 hotio/99-striptracks.sh delete mode 100644 hotio/HOTIO.md diff --git a/.assets/hotio-striptracks-synology.png b/.assets/hotio-striptracks-synology.png deleted file mode 100644 index 2439429eae8880cd9fcee6fed8626b4a949f021d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15930 zcmbumby!qi_clHVh=_m)3P`C)cQ*r4N=r(2cXudCr*wnF&`5Vl=Kw=UOAcKF3^6e8 z;OBY1`FpSTj~~~?nX}K?XYaN5*?X;f-D{mNWkng>$1fiP007(%? zQO9x#(e)) z0{$Q=uI8zKu!QgVd^3~n*x*&*s|SgpZ^^$HYxeTEnRO9PwmI6h?D=hIgase!Rl6N& zl+``rRw^iNDKEEmSQ0K`c%{v>yyWKa`-WKy-Q9`G!(sN@(z|G7Uq<_?dSmPm44zM4 zLNVVtudLiyY-I{?xhQ@o91{>&0e7>*#)Ob#8CS4$xF0nCYv{EU7D`OO)AyK>D=}ncCS#qqojz7K?%@7e`=vHLlY^i=>Ddg6mK_{N_g3I0H4x9a04rbkK#0_ zKOOI?Yh57(@#mya!vEM4@*3#bx)Uy(?bLyMAEWb&UM7@uI&eFzJ$^=HBOPsn8rAr$ z)sjRzsTisYpvtL*;-td|I;FJ&;(IyYKj%U-fnq_YNdSSig5wI$k$w32dE2=KkZn0g znE#Y}q-Zu#9xJKb0TQNCl0axaR|U74n5j9#v1$8O9HL>12%Ya4cTm@RCxqPVwdMv8 z6$JPi3AL@}O5dI8)7Y7+Fc}+Gs{MWB$(K>)Yr6pJY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B z`7IfVW+IjGqPL9E$cs=Vs7!EdT4Nz2=SyjDJgp~WnvO-0LH$cwIZgyK?jO+f?$;YK zS7*O=oY+T^Y1Fc?U-r%Q7Yb`1nmFqib=Epdn}$^tl1n1A`Mx1C!kE<$3aKTqDSLTq z_uWe$n^~EJG*%6(C2*!$iN-@88YoUrnl|hB9|`EG2(G(5KYoCy|DOJ zcB_By4+cxNL93%&!`Vec1eh7ZDCYY0AvlS97EPZDOFwQ@{>@l~?LPHfPiL{SMnTl7 zc(qh=_^JP@IbC#@Zl2R2`i3N00(*Flaox25w$|-WRMOi*TxzBFJJCTwyR{xj%N@gG zb+@Wiyt(Pwm%wsfjl*%`w|K@gDt;k)3JE!>xj=y*{gv zb&)7%I7jPH)BhSOJaLjfUaTIsD1H6PG+~ZiR zAJ-{42$C;tf*dy$$bh|qm}cb+JZbe8}4XV;Q7 zw>O9sK*atxi%;xr0{aWTe<$?O8=*Y(!1ua>DY*0~$6ohW=synpyIk3q_kizz`sn!? z^+x;umCnQV-v0G365uKJztH0UD^2i!g2(@F=I}qT<^QkSYHynTdH#MI^hf3liS{ef XbM=!xJt`v*0QexKC|U8&@XP-J4uUNO diff --git a/README.md b/README.md index 6c0d0044..907ee4a3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # About A [Docker Mod](https://github.com/linuxserver/docker-mods) for the LinuxServer.io Radarr/Sonarr v3 or higher Docker containers that adds a script to automatically strip out unwanted audio and subtitle tracks, keeping only the desired languages. -**NEW!** There is a now an installer for **hotio** containers! See the [HOTIO.md](./hotio/HOTIO.md) file for more details. - **This unified script works in both Radarr and Sonarr. Use this mod in either container!** >**NOTE:** This mod supports Linux OSes only. diff --git a/hotio/99-striptracks.sh b/hotio/99-striptracks.sh deleted file mode 100644 index a8c33f3e..00000000 --- a/hotio/99-striptracks.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/command/with-contenv bash -# shellcheck shell=bash - -# Custom script to install Striptracks Mod meant for Radarr or Sonarr Docker containers -# WARNING: Minimal error handling! - -# Pre-set LSIO Docker Mod variables -DOCKER_MODS=linuxserver/mods:radarr-striptracks -#DOCKER_MODS_DEBUG=true -export DOCKER_MODS -export DOCKER_MODS_DEBUG -[ "$DOCKER_MODS_DEBUG" = "true" ] && echo "[mod-install] DOCKER_MODS: $DOCKER_MODS" && echo "[mod-install] DOCKER_MODS_DEBUG: $DOCKER_MODS_DEBUG" -echo "[mod-install] installing $DOCKER_MODS mod" - -# Steal the current docker-mods version from the source -MODS_VERSION=$(curl -s --fail-with-body "https://raw.githubusercontent.com/linuxserver/docker-baseimage-alpine/master/Dockerfile" | sed -nr 's/^ARG MODS_VERSION="?([^"]+)"?/\1/p') -[ "$DOCKER_MODS_DEBUG" = "true" ] && echo "[mod-install] MODS_VERSION: $MODS_VERSION" - -# Download and execute the main docker-mods script to install the mod -# Very well thought out code, this. Why reinvent? -curl -s --fail-with-body -o /docker-mods "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" -ret=$? -[ $ret -ne 0 ] && echo "[mod-install] unable to download docker-mods: Exit code: $ret. Exiting." && exit 1 - -chmod +x /docker-mods - -. /docker-mods -[ $ret -ne 0 ] && echo "[mod-install] docker-mods installation error: $ret. Exiting." && exit 1 - -# Get script version from installed mod -VERSION=$(sed -nr 's/^export striptracks_ver="?([^"]+)"?/\1/p' /usr/local/bin/striptracks.sh) -[ "$DOCKER_MODS_DEBUG" = "true" ] && echo "[mod-install] striptracks.sh version: $VERSION" - -# Remaining setup that is normally done with s6-overlay init scripts, but that rely on a lot of Docker Mods dependencies -cat <>> Striptracks Mod by TheCaptain989 <<< -Repos: - Dev/test: https://github.com/TheCaptain989/radarr-striptracks - Prod: https://github.com/linuxserver/docker-mods/tree/radarr-striptracks - -Version: ${VERSION} ----------------- -EOF - -# Determine if setup is needed -if [ ! -f /usr/bin/mkvmerge ]; then - echo "[mod-install] Running first time setup." - - if [ -f /usr/bin/apt ]; then - # Ubuntu - echo "[mod-install] Installing MKVToolNix using apt-get" - apt-get update && \ - apt-get -y install mkvtoolnix && \ - rm -rf /var/lib/apt/lists/* - elif [ -f /sbin/apk ]; then - # Alpine - echo "[mod-install] Installing MKVToolNix using apk" - apk upgrade --no-cache && \ - apk add --no-cache mkvtoolnix && \ - rm -rf /var/lib/apt/lists/* - else - # Unknown - echo "[mod-install] Unknown package manager. Attempting to install MKVToolNix using apt-get" - apt-get update && \ - apt-get -y install mkvtoolnix && \ - rm -rf /var/lib/apt/lists/* - fi -fi - -# Check ownership and attributes on each script file -[ -z "$PUID" ] && owner_user="root" || owner_user="$PUID" -[ -z "$PGID" ] && owner_group="root" || owner_group="$PGID" -for file in /usr/local/bin/striptracks*.sh -do - # Change ownership - if [ "$(stat -c '%G' "$file")" != "$owner_group" ]; then - echo "[mod-install] Changing ownership on $file script to $owner_user:$owner_group." - chown "$owner_user":"$owner_group" "$file" - fi - - # Make executable - if [ ! -x "$file" ]; then - echo "[mod-install] Making $file script executable." - chmod +x "$file" - fi -done diff --git a/hotio/HOTIO.md b/hotio/HOTIO.md deleted file mode 100644 index 2e23cea7..00000000 --- a/hotio/HOTIO.md +++ /dev/null @@ -1,86 +0,0 @@ -# About -This mod can now be used with [hotio](https://hotio.dev/) containers by using the method described in the hotio [FAQ](https://hotio.dev/faq/#:~:text=I%20would%20like%20to%20execute%20my%20own%20scripts%20on%20startup%2C%20how%20would%20I%20do%20this%3F) to install it. -(This method relies on s6-overlay v2 behavior still working, though v3 is the current version.) - ->This is a quick and dirty script with minimal testing or error checking. Note that it only runs *inside* the hotio container. - -# Installation -1. Download the **[99-striptracks.sh](./99-striptracks.sh)** install script and save it somewhere that can be mounted by your container. - - *Example location:* `/volume1/docker/99-striptracks.sh` - - *Example curl line to download the installation script:* - - ```shell - curl -s https://raw.githubusercontent.com/TheCaptain989/radarr-striptracks/master/hotio/99-striptracks.sh >/volume1/docker/99-striptracks.sh - ``` - -2. Make it executable: - - ```shell - chmod +x /volume1/docker/99-striptracks.sh - ``` - -3. Pull your selected container ([hotio/radarr](https://github.com/orgs/hotio/packages/container/package/radarr "hotio's Radarr container") or [hotio/sonarr](https://github.com/orgs/hotio/packages/container/package/sonarr "hotio.io's Sonarr container")) from GitHub Container Registry or Docker Hub: - `docker pull ghcr.io/hotio/radarr:latest` OR - `docker pull ghcr.io/hotio/sonarr:latest` - -4. Configure the Docker container with all the port, volume, and environment settings from the *original container documentation* here: - **[hotio/radarr](https://hotio.dev/containers/radarr/ "Radarr Docker container")** - **[hotio/sonarr](https://hotio.dev/containers/sonarr/ "Sonarr Docker container")** - - >**Note:** Notice that no environment variables are used in this setup. That is a specific feature of LSIO containers and is not applicable to hotio containers. - - 1. Add the **99-striptracks.sh** file path as a mount point in your `compose.yml` file or `docker run` command. - >**Note:** The `/etc/cont-init.d/99-striptracks` path below is important; don't change it! - - *Example Docker Compose YAML Configuration* - - ```yaml - services: - sonarr: - container_name: sonarr - image: ghcr.io/hotio/sonarr - ports: - - "8989:8989" - environment: - - PUID=1000 - - PGID=1000 - - UMASK=002 - - TZ=Etc/UTC - volumes: - - /:/config - - /:/data - - /volume1/docker/99-striptracks.sh:/etc/cont-init.d/99-striptracks - ``` - - *Example Docker Run Command* - - ```shell - docker run --rm \ - --name sonarr \ - -p 8989:8989 \ - -e PUID=1000 \ - -e PGID=1000 \ - -e UMASK=002 \ - -e TZ="Etc/UTC" \ - -v /:/config \ - -v /:/data \ - -v /volume1/docker/99-striptracks.sh:/etc/cont-init.d/99-striptracks \ - ghcr.io/hotio/sonarr - ``` - - *Example Synology Configuration* - ![striptracks hotio](../.assets/hotio-striptracks-synology.png "Synology container settings") - - >**Note:** Please be sure that your mount points for `/config` and `/data` above do not overlap with the newly added mount point! - - 2. Start the container. - -5. After the container has fully started, continue with Installation step 3 in the previous [README](../README.md#installation). - -## Requirements -You must have the **bash** shell available in your host path. You *might* attempt editing the [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) in the 99-striptracks.sh script to get around this, but that is beyond the scope of this document. - -## Known Problems -On at least *some* Synology hosts that use the ash shell, this script will cause the container to abort and not start. If this happens, ***check your container logs*** for hints as to what may be wrong. From f8305b0b7ce6ffc7ac48949e44a47982a790649a Mon Sep 17 00:00:00 2001 From: TheCaptain989 Date: Mon, 19 Aug 2024 20:30:27 -0500 Subject: [PATCH 8/8] Removed hotio --- .dockerignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 81a371cb..03a45ec9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,7 +5,6 @@ .gitattributes .vscode .assets -hotio READMETEMPLATE.md README.md SECURITY.md