Merge pull request #1039 from TheCaptain989/radarr-striptracks

radarr: striptracks release 2.16.1
This commit is contained in:
aptalca
2025-06-09 09:18:10 -04:00
committed by GitHub
6 changed files with 34 additions and 26 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ jobs:
echo "MULTI_ARCH=${{ env.MULTI_ARCH }}" >> $GITHUB_OUTPUT
if [[ -z "${{ env.MOD_VERSION }}" ]]; then
# **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. ****
MOD_VERSION="2.16.0"
MOD_VERSION="2.16.1"
else
MOD_VERSION=${{ env.MOD_VERSION }}
echo "MOD_VERSION_OVERRIDE=true" >> $GITHUB_OUTPUT
+15 -14
View File
@@ -362,20 +362,21 @@ You may use any of these in place of `striptracks.sh` mentioned in the [Installa
<summary>List of scripts</summary>
```shell
striptracks-debug.sh # Use detected languages, but enable debug logging
striptracks-debug-2.sh # Use detected languages, enable debug logging level 2
striptracks-debug-max.sh # Use detected languages, enable highest debug logging
striptracks-dut.sh # Keep Dutch and Unknown audio, and Dutch subtitles
striptracks-eng.sh # Keep English and Unknown audio, and English subtitles
striptracks-eng-debug.sh # Keep English and Unknown audio, and English subtitles, and enable debug logging
striptracks-eng-fre.sh # Keep English, French, and Unknown audio, and English and French subtitles
striptracks-eng-jpn.sh # Keep English, Japanese, and Unknown audio and English subtitles
striptracks-fre.sh # Keep French and Unknown audio, and French subtitles
striptracks-ger.sh # Keep German and Unknown audio, and German subtitles
striptracks-spa.sh # Keep Spanish and Unknown audio, and Spanish subtitles
striptracks-org-eng.sh # Keep Original, English, Unknown, and forced audio, and Original, English, and forced subtitles
striptracks-org-ger.sh # Keep Original, German, and Unknown audio, and Original and German subtitles
striptracks-org-spa.sh # Keep Original, Spanish, and Unknown audio, and Original and Spanish subtitles
striptracks-debug.sh # Use detected languages, but enable debug logging
striptracks-debug-2.sh # Use detected languages, enable debug logging level 2
striptracks-debug-max.sh # Use detected languages, enable highest debug logging
striptracks-dut.sh # Keep Dutch and Unknown audio, and Dutch subtitles
striptracks-eng.sh # Keep English and Unknown audio, and English subtitles
striptracks-eng-debug.sh # Keep English and Unknown audio, and English subtitles, and enable debug logging
striptracks-eng-fre.sh # Keep English, French, and Unknown audio, and English and French subtitles
striptracks-eng-jpn.sh # Keep English, Japanese, and Unknown audio and English subtitles
striptracks-fre.sh # Keep French and Unknown audio, and French subtitles
striptracks-ger.sh # Keep German and Unknown audio, and German subtitles
striptracks-spa.sh # Keep Spanish and Unknown audio, and Spanish subtitles
striptracks-low-priority.sh # Use detected languages, but execute mkvmerge with low CPU and I/O priority
striptracks-org-eng.sh # Keep Original, English, and Unknown audio, and Original and English subtitles
striptracks-org-ger.sh # Keep Original, German, and Unknown audio, and Original and German subtitles
striptracks-org-spa.sh # Keep Original, Spanish, and Unknown audio, and Original and Spanish subtitles
```
</details>
+1 -1
View File
@@ -1,3 +1,3 @@
#!/bin/bash
. /usr/local/bin/striptracks.sh -d --audio :eng:und:any+d --subs :eng:any+f
. /usr/local/bin/striptracks.sh -d --audio :eng:und --subs :eng
@@ -0,0 +1,3 @@
#!/bin/bash
. /usr/local/bin/striptracks.sh --priority low
+1 -1
View File
@@ -1,3 +1,3 @@
#!/bin/bash
. /usr/local/bin/striptracks.sh --audio :org:eng:und:any+d --subs :org:eng:any+f
. /usr/local/bin/striptracks.sh --audio :org:eng:und --subs :org:eng
+13 -9
View File
@@ -308,7 +308,7 @@ function process_command_line {
fi
;;
-p|--priority )
# Set process priority
# Set process priority (see issue #102)
if [ -z "$2" ] || [ ${2:0:1} = "-" ]; then
echo "Error|Invalid option: $1 requires an argument." >&2
usage
@@ -327,12 +327,12 @@ function process_command_line {
shift 2
;;
--reorder )
# Reorder audio and subtitles tracks
# Reorder audio and subtitles tracks (see issue #92)
export striptracks_reorder="true"
shift
;;
--disable-recycle )
# Disable recycle bin use
# Disable recycle bin use (see issue #99)
export striptracks_recycle="false"
shift
;;
@@ -614,7 +614,7 @@ function delete_videofile {
# return $return
# }
function set_metadata {
# Update file metadata in Radarr/Sonarr
# Update file metadata in Radarr/Sonarr (see issue #97)
local i=0
for ((i=1; i <= 5; i++)); do
@@ -633,10 +633,11 @@ function get_mediainfo {
local videofile="$1"
local mkvcommand="/usr/bin/mkvmerge -J \"$videofile\""
# shellcheck disable=SC2016
local mkvcommand='/usr/bin/mkvmerge -J "$videofile"'
[ $striptracks_debug -ge 1 ] && echo "Debug|Executing: $mkvcommand" | log
unset striptracks_json
# This must be a declare statement to avoid the 'Argument list too long' error with some large returned JSON
# This must be a declare statement to avoid the 'Argument list too long' error with some large returned JSON (see issue #104)
declare -g striptracks_json
striptracks_json=$(eval $mkvcommand)
local return=$?
@@ -692,7 +693,7 @@ function rename_videofile {
return
}
function set_language {
# Set videofile language
# Set videofile language (see issue #97)
local json_languages="$1" # JSON array of languages
local videofile_id="$2" # ID of the video file to update
@@ -1012,6 +1013,7 @@ function call_api {
method="-X $method"
fi
unset striptracks_result
# (See issue #104)
declare -g striptracks_result
striptracks_result=$(curl -s --fail-with-body \
-H "X-Api-Key: $striptracks_apikey" \
@@ -1512,7 +1514,8 @@ function set_title_and_exit_if_nothing_removed {
# Remuxing not performed
local message="Info|No tracks would be removed from video$( [ "$striptracks_reorder" = "true" ] && echo " or reordered"). Setting Title only and exiting."
echo "$message" | log
local mkvcommand="/usr/bin/mkvpropedit -q --edit info --set \"title=$striptracks_title\" \"$striptracks_video\""
# shellcheck disable=SC2016
local mkvcommand='/usr/bin/mkvpropedit -q --edit info --set "title=$striptracks_title" "$striptracks_video"'
[ $striptracks_debug -ge 1 ] && echo "Debug|Executing: $mkvcommand" | log
local result
result=$(eval $mkvcommand)
@@ -1566,7 +1569,8 @@ function remux_video {
fi
# Execute MKVmerge (remux then rename, see issue #46)
local mkvcommand="$striptracks_nice /usr/bin/mkvmerge --title \"$striptracks_title\" -q -o \"$striptracks_tempvideo\" $audioarg $subsarg $striptracks_neworder \"$striptracks_video\""
# shellcheck disable=SC2016
local mkvcommand='$striptracks_nice /usr/bin/mkvmerge --title "$striptracks_title" -q -o "$striptracks_tempvideo" $audioarg $subsarg $striptracks_neworder "$striptracks_video"'
[ $striptracks_debug -ge 1 ] && echo "Debug|Executing: $mkvcommand" | log
local result
result=$(eval $mkvcommand)