Skip to content

Commit e1e76f5

Browse files
authored
Merge pull request #1039 from TheCaptain989/radarr-striptracks
radarr: striptracks release 2.16.1
2 parents a8fa131 + b0bc301 commit e1e76f5

File tree

6 files changed

+34
-26
lines changed

6 files changed

+34
-26
lines changed

.github/workflows/BuildImage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
echo "MULTI_ARCH=${{ env.MULTI_ARCH }}" >> $GITHUB_OUTPUT
3333
if [[ -z "${{ env.MOD_VERSION }}" ]]; then
3434
# **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. ****
35-
MOD_VERSION="2.16.0"
35+
MOD_VERSION="2.16.1"
3636
else
3737
MOD_VERSION=${{ env.MOD_VERSION }}
3838
echo "MOD_VERSION_OVERRIDE=true" >> $GITHUB_OUTPUT

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -362,20 +362,21 @@ You may use any of these in place of `striptracks.sh` mentioned in the [Installa
362362
<summary>List of scripts</summary>
363363

364364
```shell
365-
striptracks-debug.sh # Use detected languages, but enable debug logging
366-
striptracks-debug-2.sh # Use detected languages, enable debug logging level 2
367-
striptracks-debug-max.sh # Use detected languages, enable highest debug logging
368-
striptracks-dut.sh # Keep Dutch and Unknown audio, and Dutch subtitles
369-
striptracks-eng.sh # Keep English and Unknown audio, and English subtitles
370-
striptracks-eng-debug.sh # Keep English and Unknown audio, and English subtitles, and enable debug logging
371-
striptracks-eng-fre.sh # Keep English, French, and Unknown audio, and English and French subtitles
372-
striptracks-eng-jpn.sh # Keep English, Japanese, and Unknown audio and English subtitles
373-
striptracks-fre.sh # Keep French and Unknown audio, and French subtitles
374-
striptracks-ger.sh # Keep German and Unknown audio, and German subtitles
375-
striptracks-spa.sh # Keep Spanish and Unknown audio, and Spanish subtitles
376-
striptracks-org-eng.sh # Keep Original, English, Unknown, and forced audio, and Original, English, and forced subtitles
377-
striptracks-org-ger.sh # Keep Original, German, and Unknown audio, and Original and German subtitles
378-
striptracks-org-spa.sh # Keep Original, Spanish, and Unknown audio, and Original and Spanish subtitles
365+
striptracks-debug.sh # Use detected languages, but enable debug logging
366+
striptracks-debug-2.sh # Use detected languages, enable debug logging level 2
367+
striptracks-debug-max.sh # Use detected languages, enable highest debug logging
368+
striptracks-dut.sh # Keep Dutch and Unknown audio, and Dutch subtitles
369+
striptracks-eng.sh # Keep English and Unknown audio, and English subtitles
370+
striptracks-eng-debug.sh # Keep English and Unknown audio, and English subtitles, and enable debug logging
371+
striptracks-eng-fre.sh # Keep English, French, and Unknown audio, and English and French subtitles
372+
striptracks-eng-jpn.sh # Keep English, Japanese, and Unknown audio and English subtitles
373+
striptracks-fre.sh # Keep French and Unknown audio, and French subtitles
374+
striptracks-ger.sh # Keep German and Unknown audio, and German subtitles
375+
striptracks-spa.sh # Keep Spanish and Unknown audio, and Spanish subtitles
376+
striptracks-low-priority.sh # Use detected languages, but execute mkvmerge with low CPU and I/O priority
377+
striptracks-org-eng.sh # Keep Original, English, and Unknown audio, and Original and English subtitles
378+
striptracks-org-ger.sh # Keep Original, German, and Unknown audio, and Original and German subtitles
379+
striptracks-org-spa.sh # Keep Original, Spanish, and Unknown audio, and Original and Spanish subtitles
379380
```
380381

381382
</details>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
. /usr/local/bin/striptracks.sh -d --audio :eng:und:any+d --subs :eng:any+f
3+
. /usr/local/bin/striptracks.sh -d --audio :eng:und --subs :eng
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
. /usr/local/bin/striptracks.sh --priority low
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
. /usr/local/bin/striptracks.sh --audio :org:eng:und:any+d --subs :org:eng:any+f
3+
. /usr/local/bin/striptracks.sh --audio :org:eng:und --subs :org:eng

root/usr/local/bin/striptracks.sh

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ function process_command_line {
308308
fi
309309
;;
310310
-p|--priority )
311-
# Set process priority
311+
# Set process priority (see issue #102)
312312
if [ -z "$2" ] || [ ${2:0:1} = "-" ]; then
313313
echo "Error|Invalid option: $1 requires an argument." >&2
314314
usage
@@ -327,12 +327,12 @@ function process_command_line {
327327
shift 2
328328
;;
329329
--reorder )
330-
# Reorder audio and subtitles tracks
330+
# Reorder audio and subtitles tracks (see issue #92)
331331
export striptracks_reorder="true"
332332
shift
333333
;;
334334
--disable-recycle )
335-
# Disable recycle bin use
335+
# Disable recycle bin use (see issue #99)
336336
export striptracks_recycle="false"
337337
shift
338338
;;
@@ -614,7 +614,7 @@ function delete_videofile {
614614
# return $return
615615
# }
616616
function set_metadata {
617-
# Update file metadata in Radarr/Sonarr
617+
# Update file metadata in Radarr/Sonarr (see issue #97)
618618

619619
local i=0
620620
for ((i=1; i <= 5; i++)); do
@@ -633,10 +633,11 @@ function get_mediainfo {
633633

634634
local videofile="$1"
635635

636-
local mkvcommand="/usr/bin/mkvmerge -J \"$videofile\""
636+
# shellcheck disable=SC2016
637+
local mkvcommand='/usr/bin/mkvmerge -J "$videofile"'
637638
[ $striptracks_debug -ge 1 ] && echo "Debug|Executing: $mkvcommand" | log
638639
unset striptracks_json
639-
# This must be a declare statement to avoid the 'Argument list too long' error with some large returned JSON
640+
# This must be a declare statement to avoid the 'Argument list too long' error with some large returned JSON (see issue #104)
640641
declare -g striptracks_json
641642
striptracks_json=$(eval $mkvcommand)
642643
local return=$?
@@ -692,7 +693,7 @@ function rename_videofile {
692693
return
693694
}
694695
function set_language {
695-
# Set videofile language
696+
# Set videofile language (see issue #97)
696697

697698
local json_languages="$1" # JSON array of languages
698699
local videofile_id="$2" # ID of the video file to update
@@ -1012,6 +1013,7 @@ function call_api {
10121013
method="-X $method"
10131014
fi
10141015
unset striptracks_result
1016+
# (See issue #104)
10151017
declare -g striptracks_result
10161018
striptracks_result=$(curl -s --fail-with-body \
10171019
-H "X-Api-Key: $striptracks_apikey" \
@@ -1512,7 +1514,8 @@ function set_title_and_exit_if_nothing_removed {
15121514
# Remuxing not performed
15131515
local message="Info|No tracks would be removed from video$( [ "$striptracks_reorder" = "true" ] && echo " or reordered"). Setting Title only and exiting."
15141516
echo "$message" | log
1515-
local mkvcommand="/usr/bin/mkvpropedit -q --edit info --set \"title=$striptracks_title\" \"$striptracks_video\""
1517+
# shellcheck disable=SC2016
1518+
local mkvcommand='/usr/bin/mkvpropedit -q --edit info --set "title=$striptracks_title" "$striptracks_video"'
15161519
[ $striptracks_debug -ge 1 ] && echo "Debug|Executing: $mkvcommand" | log
15171520
local result
15181521
result=$(eval $mkvcommand)
@@ -1566,7 +1569,8 @@ function remux_video {
15661569
fi
15671570

15681571
# Execute MKVmerge (remux then rename, see issue #46)
1569-
local mkvcommand="$striptracks_nice /usr/bin/mkvmerge --title \"$striptracks_title\" -q -o \"$striptracks_tempvideo\" $audioarg $subsarg $striptracks_neworder \"$striptracks_video\""
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"'
15701574
[ $striptracks_debug -ge 1 ] && echo "Debug|Executing: $mkvcommand" | log
15711575
local result
15721576
result=$(eval $mkvcommand)

0 commit comments

Comments
 (0)