You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
# About
2
-
A [Docker Mod](https://github.com/linuxserver/docker-mods) for the LinuxServer.io Radarr/Sonarr v3 Docker container that adds a script to automatically strip out unwanted audio and subtitle tracks, keeping only the desired languages.
3
-
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**
2
+
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.
5
3
6
4
**This unified script works in both Radarr and Sonarr. Use this mod in either container!**
7
5
>**NOTE:** This mod supports Linux OSes only.
8
-
9
-
Production Container info: 
6
+
<!-- markdownlint-disable -->
7
+
Production Container info: 
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:
@@ -101,7 +101,7 @@ The language selection **'Unknown'** will match tracks with **no configured lang
101
101
102
102
The Radarr language selection **'Any'** has two purposes:
103
103
1) It will trigger a search of languages in ***Custom Formats***
104
-
2) If none are found, it will will preserve **all languages** in the video file. This is functionally equivalent to calling the script with `--audio :any --subs :any` command-line options. See [Any language code](./README.md#any-language-code) below for more details.
104
+
2) If none are found, it will preserve **all languages** in the video file. This is functionally equivalent to calling the script with `--audio :any --subs :any` command-line options. See [Any language code](./README.md#any-language-code) below for more details.
105
105
106
106
>**Note:** When using the *Custom Format* conditions and scoring to select languages you may not get the results you expect.
107
107
>This can be non-intuitive configuration, especially when using negative scoring and the 'Negate' option.
@@ -154,15 +154,15 @@ Where:
154
154
155
155
Option|Argument|Description
156
156
---|---|---
157
-
-a, --audio|<audio_languages>|Audio languages to keep<br/>ISO639-2 code(s) prefixed with a colon (`:`)
158
-
-s, --subs|<subtitle_languages>|Subtitle languages to keep<br/>IISO639-2 code(s) prefixed with a colon (`:`)
157
+
-a, --audio|<audio_languages>|Audio languages to keep<br/>ISO 639-2 code(s) prefixed with a colon (`:`)
158
+
-s, --subs|<subtitle_languages>|Subtitle languages to keep<br/>ISO 639-2 code(s) prefixed with a colon (`:`)
159
159
-f, --file|<video_file>|If included, the script enters **[Batch Mode](./README.md#batch-mode)** and converts the specified video file.<br/>Requires the `-a` option.<br/>![danger] **WARNING:** Do not use this argument when called from Radarr or Sonarr!
160
160
-l, --log|\<log_file\>|The log filename<br/>Default of /config/log/striptracks.txt
161
161
-d, --debug|\[\<level\>\]|Enables debug logging. Level is optional.<br/>Default of 1 (low)<br/>2 includes JSON output<br/>3 contains even more JSON output
162
162
--help| |Display help and exit.
163
163
--version| |Display version and exit.
164
164
165
-
The `<audio_languages>` and `<subtitle_languages>` are optional arguments that are colon (`:`) prepended language codes in [ISO639-2](https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes "List of ISO 639-2 codes") format.
165
+
The `<audio_languages>` and `<subtitle_languages>` are optional arguments that are colon (`:`) prepended language codes in [ISO 639-2](https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes "List of ISO 639-2 codes") format.
166
166
For example:
167
167
168
168
* `:eng`
@@ -188,7 +188,7 @@ Several [Included Wrapper Scripts](./README.md#included-wrapper-scripts) use thi
188
188
189
189
### Unknown language code
190
190
The `:und` language code is a special code. When used, the script will match on any track that has a null or blank language attribute. If not included, tracks with no language attribute will be removed.
191
-
>![danger] **NOTE:** It is common for M2TS and AVI containers to have tracks with unknown languages! It is strongly recommended to include `:und` in most instances unless you know exactly what you're doing.
191
+
>![danger] **NOTE:** It is common for M2TS and AVI files to have tracks with unknown languages! It is strongly recommended to include `:und` in most instances unless you know exactly what you're doing.
192
192
193
193
## Special Handling of Audio
194
194
The script is smart enough to not remove the last audio track. There is in fact no way to force the script to remove all audio. This way you don't have to specify every possible language if you are importing a foreign film, for example.
@@ -336,5 +336,8 @@ This would not be possible without the following:
336
336
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).
337
337
Icons made by [Freepik](https://www.freepik.com) from [Flaticon](https://www.flaticon.com/)
338
338
339
+
## Legacy Change Notes
340
+
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.
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
0 commit comments