Skip to content

Commit c52b87f

Browse files
committed
Revert "Release 2.7.1"
This reverts commit 57888b4.
1 parent 57888b4 commit c52b87f

File tree

9 files changed

+9
-271
lines changed

9 files changed

+9
-271
lines changed
-15.6 KB
Binary file not shown.

.dockerignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
.gitignore
44
.github
55
.gitattributes
6-
.vscode
76
.assets
8-
hotio
97
READMETEMPLATE.md
108
README.md
119
SECURITY.md

.github/workflows/BuildImage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_OUTPUT
2323
echo "MULTI_ARCH=${{ env.MULTI_ARCH }}" >> $GITHUB_OUTPUT
2424
# **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. ****
25-
MOD_VERSION="2.7.1"
25+
MOD_VERSION=${GITHUB_SHA:0:7}
2626
echo "MOD_VERSION=${MOD_VERSION}" >> $GITHUB_OUTPUT
2727
outputs:
2828
GITHUB_REPO: ${{ steps.outputs.outputs.GITHUB_REPO }}

Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Buildstage ##
44
FROM ghcr.io/linuxserver/baseimage-alpine:3.20 as buildstage
5+
56
ARG MOD_VERSION
67

78
# copy local files
@@ -16,14 +17,11 @@ RUN \
1617

1718
## Single layer deployed image ##
1819
FROM scratch
19-
ARG MOD_VERSION
2020

21-
LABEL org.opencontainers.image.title=radarr-striptracks
21+
LABEL org.opencontainers.image.source=https://github.com/TheCaptain989/radarr-striptracks
2222
LABEL org.opencontainers.image.description="A Docker Mod to Radarr/Sonarr to automatically strip out unwanted audio and subtitle streams"
23-
LABEL org.opencontainers.image.version="${MOD_VERSION}"
24-
LABEL org.opencontainers.image.source="https://github.com/TheCaptain989/radarr-striptracks"
25-
LABEL org.opencontainers.image.authors="TheCaptain989 <thecaptain989@protonmail.com>"
2623
LABEL org.opencontainers.image.licenses=GPL-3.0-only
24+
LABEL org.opencontainers.image.authors="TheCaptain989 <thecaptain989@protonmail.com>"
2725

2826
# Add files from buildstage
2927
COPY --from=buildstage /root-layer/ /

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
# About
22
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.
33

4-
**NEW!** There is a now an installer for **hotio** containers! See the [HOTIO.md](./hotio/HOTIO.md) file for more details.
4+
**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**
55

66
**This unified script works in both Radarr and Sonarr. Use this mod in either container!**
77
>**NOTE:** This mod supports Linux OSes only.
8-
<!-- markdownlint-disable -->
8+
99
Production Container info: ![Docker Image Size](https://img.shields.io/docker/image-size/linuxserver/mods/radarr-striptracks "Container Size")
1010
[![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)
1111
Development Container info:
1212
![Docker Image Size](https://img.shields.io/docker/image-size/thecaptain989/radarr-striptracks "Container Size")
1313
![Docker Pulls](https://img.shields.io/docker/pulls/thecaptain989/radarr-striptracks?logo=docker "Container Pulls")
1414
[![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")
15-
<!-- markdownlint-restore -->
1615

1716
# Installation
1817
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:
338337
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).
339338
Icons made by [Freepik](https://www.freepik.com) from [Flaticon](https://www.flaticon.com/)
340339

341-
## Legacy Change Notes
342-
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.
343-
344340
[warning]: .assets/warning.png "Warning"
345341
[danger]: .assets/danger.png "Danger"

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Only the latest major and minor version are supported.
66

77
| Version | Supported |
88
| ------- | ------------------ |
9-
| 2.7.x | :heavy_check_mark: |
10-
| < 2.7 | :x: |
9+
| 2.6.x | :heavy_check_mark: |
10+
| < 2.6 | :x: |
1111

1212
## Reporting a Vulnerability
1313

hotio/99-striptracks.sh

Lines changed: 0 additions & 87 deletions
This file was deleted.

hotio/HOTIO.md

Lines changed: 0 additions & 86 deletions
This file was deleted.

root/usr/local/bin/striptracks.sh

Lines changed: 1 addition & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -809,63 +809,6 @@ function check_compat {
809809
[ $striptracks_debug -ge 1 ] && echo "Debug|Feature $1 is $([ $striptracks_return -eq 1 ] && echo "not ")compatible with ${striptracks_type^} v${striptracks_arr_version}." | log
810810
return $striptracks_return
811811
}
812-
# Get media management configuration
813-
function get_media_config {
814-
local url="$striptracks_api_url/config/mediamanagement"
815-
[ $striptracks_debug -ge 1 ] && echo "Debug|Getting ${striptracks_type^} configuration. Calling ${striptracks_type^} API using GET and URL '$url'" | log
816-
unset striptracks_result
817-
striptracks_result=$(curl -s --fail-with-body -H "X-Api-Key: $striptracks_apikey" \
818-
-H "Content-Type: application/json" \
819-
-H "Accept: application/json" \
820-
--get "$url")
821-
local striptracks_curlret=$?; [ $striptracks_curlret -ne 0 ] && {
822-
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}')
823-
echo "$striptracks_message" | log
824-
echo "$striptracks_message" >&2
825-
}
826-
[ $striptracks_debug -ge 2 ] && echo "API returned: $striptracks_result" | awk '{print "Debug|"$0}' | log
827-
if [ "$(echo $striptracks_result | jq -crM '.id?')" != "null" ] && [ "$(echo $striptracks_result | jq -crM '.id?')" != "" ]; then
828-
local striptracks_return=0
829-
else
830-
local striptracks_return=1
831-
fi
832-
return $striptracks_return
833-
}
834-
# Update file metadata in Radarr/Sonarr
835-
function set_video_info {
836-
local url="$striptracks_api_url/$striptracks_video_api/$striptracks_video_id"
837-
local data="$(echo $striptracks_videoinfo | jq -crM .monitored='true')"
838-
local i=0
839-
for ((i=1; i <= 5; i++)); do
840-
[ $striptracks_debug -ge 1 ] && echo "Debug|Updating monitored to 'true'. Calling ${striptracks_type^} API using PUT and URL '$url' with data $data" | log
841-
unset striptracks_result
842-
striptracks_result=$(curl -s --fail-with-body -H "X-Api-Key: $striptracks_apikey" \
843-
-H "Content-Type: application/json" \
844-
-H "Accept: application/json" \
845-
-d "$data" \
846-
-X PUT "$url")
847-
local striptracks_curlret=$?; [ $striptracks_curlret -ne 0 ] && {
848-
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}')
849-
echo "$striptracks_message" | log
850-
echo "$striptracks_message" >&2
851-
}
852-
[ $striptracks_debug -ge 2 ] && echo "Debug|API returned ${#striptracks_result} bytes." | log
853-
[ $striptracks_debug -ge 3 ] && echo "API returned: $striptracks_result" | awk '{print "Debug|"$0}' | log
854-
# Exit loop if database is not locked, else wait 1 minute
855-
if [[ ! "$(echo $striptracks_result | jq -jcrM .message?)" =~ database\ is\ locked ]]; then
856-
break
857-
else
858-
echo "Warn|Database is locked; system is likely overloaded. Sleeping 1 minute." | log
859-
sleep 60
860-
fi
861-
done
862-
if [ $striptracks_curlret -eq 0 -a "${#striptracks_result}" != 0 ]; then
863-
local striptracks_return=0
864-
else
865-
local striptracks_return=1
866-
fi
867-
return $striptracks_return
868-
}
869812
# Exit program
870813
function end_script {
871814
# Cool bash feature
@@ -1197,20 +1140,6 @@ elif [ -n "$striptracks_api_url" ]; then
11971140
echo "$striptracks_message" >&2
11981141
striptracks_exitstatus=17
11991142
fi
1200-
# Check if Radarr/Sonarr are configured to unmonitor deleted videos
1201-
get_media_config
1202-
striptracks_return=$?; [ $striptracks_return -ne 0 ] && {
1203-
# No '.id' in returned JSON
1204-
striptracks_message="Warn|The Media Management Config API returned no id."
1205-
echo "$striptracks_message" | log
1206-
echo "$striptracks_message" >&2
1207-
striptracks_exitstatus=17
1208-
}
1209-
if [ "$(echo "$striptracks_result" | jq -crM ".autoUnmonitorPreviouslyDownloaded${striptracks_video_api^}s")" = "true" ]; then
1210-
striptracks_conf_unmonitor=1
1211-
striptracks_message="Warn|Will compensate for ${striptracks_type^} configuration to unmonitor deleted ${striptracks_video_api}s."
1212-
echo "$striptracks_message" | log
1213-
fi
12141143
else
12151144
# No URL means we can't call the API
12161145
striptracks_message="Warn|Unable to determine ${striptracks_type^} API URL."
@@ -1589,18 +1518,8 @@ elif [ -n "$striptracks_api_url" ]; then
15891518

15901519
# Get new video file id
15911520
if get_video_info; then
1592-
striptracks_videoinfo="$striptracks_result"
1593-
striptracks_videofile_id="$(echo $striptracks_videoinfo | jq -crM .${striptracks_json_quality_root}.id)"
1521+
striptracks_videofile_id="$(echo $striptracks_result | jq -crM .${striptracks_json_quality_root}.id)"
15941522
[ $striptracks_debug -ge 1 ] && echo "Debug|Using new video file id '$striptracks_videofile_id'" | log
1595-
1596-
# Check if video is unmonitored after the delete/import
1597-
if [ $striptracks_conf_unmonitor -eq 1 -a "$(echo "$striptracks_videoinfo" | jq -crM ".monitored")" = "false" ]; then
1598-
striptracks_message="Warn|'$striptracks_title' is unmonitored after deleting the original video. Compensating for ${striptracks_type^} configuration."
1599-
echo "$striptracks_message" | log
1600-
# Set video to monitored again
1601-
set_video_info
1602-
fi
1603-
16041523
# Get new video file info
16051524
if get_videofile_info; then
16061525
striptracks_videofile_info="$striptracks_result"

0 commit comments

Comments
 (0)