Skip to content

Commit 52eec3e

Browse files
Release 2.16.2
1 parent b0bc301 commit 52eec3e

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

root/usr/local/bin/striptracks.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -633,13 +633,12 @@ function get_mediainfo {
633633

634634
local videofile="$1"
635635

636-
# shellcheck disable=SC2016
637-
local mkvcommand='/usr/bin/mkvmerge -J "$videofile"'
636+
local mkvcommand="/usr/bin/mkvmerge -J \"$videofile\""
638637
[ $striptracks_debug -ge 1 ] && echo "Debug|Executing: $mkvcommand" | log
639638
unset striptracks_json
640639
# This must be a declare statement to avoid the 'Argument list too long' error with some large returned JSON (see issue #104)
641640
declare -g striptracks_json
642-
striptracks_json=$(eval $mkvcommand)
641+
striptracks_json=$(eval "$mkvcommand")
643642
local return=$?
644643
[ $striptracks_debug -ge 1 ] && echo "Debug|mkvmerge returned ${#striptracks_json} bytes" | log
645644
[ $striptracks_debug -ge 2 ] && [ ${#striptracks_json} -ne 0 ] && echo "mkvmerge returned: $striptracks_json" | awk '{print "Debug|"$0}' | log
@@ -1514,11 +1513,10 @@ function set_title_and_exit_if_nothing_removed {
15141513
# Remuxing not performed
15151514
local message="Info|No tracks would be removed from video$( [ "$striptracks_reorder" = "true" ] && echo " or reordered"). Setting Title only and exiting."
15161515
echo "$message" | log
1517-
# shellcheck disable=SC2016
1518-
local mkvcommand='/usr/bin/mkvpropedit -q --edit info --set "title=$striptracks_title" "$striptracks_video"'
1516+
local mkvcommand="/usr/bin/mkvpropedit -q --edit info --set \"title=$striptracks_title\" \"$striptracks_video\""
15191517
[ $striptracks_debug -ge 1 ] && echo "Debug|Executing: $mkvcommand" | log
15201518
local result
1521-
result=$(eval $mkvcommand)
1519+
result=$(eval "$mkvcommand")
15221520
local return=$?
15231521
[ $striptracks_debug -ge 1 ] && echo "Debug|mkvpropedit returned ${#result} bytes" | log
15241522
[ $striptracks_debug -ge 2 ] && [ ${#result} -ne 0 ] && echo "mkvpropedit returned: $result" | awk '{print "Debug|"$0}' | log
@@ -1569,11 +1567,10 @@ function remux_video {
15691567
fi
15701568

15711569
# Execute MKVmerge (remux then rename, see issue #46)
1572-
# shellcheck disable=SC2016
1573-
local mkvcommand='$striptracks_nice /usr/bin/mkvmerge --title "$striptracks_title" -q -o "$striptracks_tempvideo" $audioarg $subsarg $striptracks_neworder "$striptracks_video"'
1570+
local mkvcommand="$striptracks_nice /usr/bin/mkvmerge --title \"$striptracks_title\" -q -o \"$striptracks_tempvideo\" $audioarg $subsarg $striptracks_neworder \"$striptracks_video\""
15741571
[ $striptracks_debug -ge 1 ] && echo "Debug|Executing: $mkvcommand" | log
15751572
local result
1576-
result=$(eval $mkvcommand)
1573+
result=$(eval "$mkvcommand")
15771574
local return=$?
15781575
[ $striptracks_debug -ge 1 ] && echo "Debug|mkvmerge returned ${#result} bytes" | log
15791576
[ $striptracks_debug -ge 2 ] && [ ${#result} -ne 0 ] && echo "mkvmerge returned: $result" | awk '{print "Debug|"$0}' | log

0 commit comments

Comments
 (0)