Release 2.16.1

This commit is contained in:
TheCaptain989
2025-06-09 12:52:38 +00:00
committed by GitHub
parent a8fa131175
commit b0bc301d28
6 changed files with 34 additions and 26 deletions
+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)