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
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -210,7 +210,7 @@ All language conditions with positive scores *and* Negated conditions with negat
210
210
The script also supports command-line arguments that will override the automatic language detection. More granular control can therefore be exerted or extended using tagging and defining multiple *Connect* scripts (this is native Radarr/Sonarr functionality outside the scope of this documentation).
<summary>Table of Command-Line Arguments</summary>
@@ -219,8 +219,8 @@ Option|Argument|Description
219
219
---|---|---
220
220
`-a`, `--audio`|`<audio_languages>`|Audio languages to keep<br/>ISO 639-2 code(s) prefixed with a colon (`:`)<br/>Each code may optionally be followed by a plus (`+`) and one or more [modifiers](#language-code-modifiers).
221
221
`-s`, `--subs`|`<subtitle_languages>`|Subtitle languages to keep<br/>ISO 639-2 code(s) prefixed with a colon (`:`)<br/>Each code may optionally be followed by a plus (`+`) and one or more modifiers.
222
-
`--reorder`| |Reorder audio and subtitles tracks to match the language code order specified in the `<audio_languages>` and `<subtitle_languages>` arguments.
223
222
`-f`, `--file`|`<video_file>`|If included, the script enters **[Batch Mode](#batch-mode)** and converts the specified video file.<br/>Requires the `--audio` option.<br/>![notes] **Do not** use this argument when called from Radarr or Sonarr!
223
+
`--reorder`| |Reorder audio and subtitles tracks to match the language code order specified in the `<audio_languages>` and `<subtitle_languages>` arguments.
224
224
`-l`, `--log`|`<log_file>`|The log filename<br/>Default is `/config/log/striptracks.txt`
225
225
`-c`, `--config`|`<config_file>`|Radarr/Sonarr XML configuration file<br/>Default is `/config/config.xml`
226
226
`-d`, `--debug`|`[<level>]`|Enables debug logging. Level is optional.<br/>Default is `1` (low)<br/>`2` includes JSON output<br/>`3` contains even more JSON output
Options can also be set via the STRIPTRACKS_ARGS environment variable.
82
82
Command-line arguments override the environment variable.
@@ -92,14 +92,14 @@ Options and Arguments:
92
92
multiple codes may be concatenated.
93
93
Each code may optionally be followed by a
94
94
plus \`+\` and one or more modifiers.
95
-
--reorder Reorder audio and subtitles tracks to match
96
-
the language code order specified in the
97
-
<audio_languages> and <subtitle_languages>
98
-
arguments.
99
95
-f, --file <video_file> If included, the script enters batch mode
100
96
and converts the specified video file.
101
97
WARNING: Do not use this argument when called
102
98
from Radarr or Sonarr!
99
+
--reorder Reorder audio and subtitles tracks to match
100
+
the language code order specified in the
101
+
<audio_languages> and <subtitle_languages>
102
+
arguments.
103
103
-l, --log <log_file> Log filename
104
104
[default: /config/log/striptracks.txt]
105
105
-c, --config <config_file> Radarr/Sonarr XML configuration file
@@ -659,8 +659,8 @@ function delete_video {
659
659
# }
660
660
# Update file metadata in Radarr/Sonarr
661
661
functionset_metadata {
662
-
local url="$striptracks_api_url/$striptracks_videofile_api/editor"
663
-
local data="$(echo $striptracks_original_metadata| jq -crM "{${striptracks_videofile_api}Ids: [${striptracks_videofile_id}], quality, releaseGroup}")"
662
+
local url="$striptracks_api_url/$striptracks_videofile_api/bulk"
663
+
local data="$(echo $striptracks_original_metadata| jq -crM "[{id:${striptracks_videofile_id}, quality, releaseGroup}]")"
664
664
local i=0
665
665
for((i=1; i <=5; i++));do
666
666
[ $striptracks_debug-ge 1 ] &&echo"Debug|Updating from quality '$(echo $striptracks_videofile_info| jq -crM .quality.quality.name)' to '$(echo $striptracks_original_metadata| jq -crM .quality.quality.name)' and release group '$(echo $striptracks_videofile_info| jq -crM '.releaseGroup | select(. != null)')' to '$(echo $striptracks_original_metadata| jq -crM '.releaseGroup | select(. != null)')'. Calling ${striptracks_type^} API using PUT and URL '$url' with data $data"| log
@@ -794,10 +794,10 @@ function rename_video {
794
794
fi
795
795
return$striptracks_return
796
796
}
797
-
# Set video language in Radarr
798
-
functionset_radarr_language {
799
-
local url="$striptracks_api_url/$striptracks_videofile_api/editor"
800
-
local data="{\"${striptracks_videofile_api}Ids\":[${striptracks_videofile_id}],\"languages\":${striptracks_json_languages}}"
797
+
# Set video language
798
+
functionset_language {
799
+
local url="$striptracks_api_url/$striptracks_videofile_api/bulk"
800
+
local data="[{\"id\":${striptracks_videofile_id},\"languages\":${striptracks_json_languages}}]"
801
801
[ $striptracks_debug-ge 1 ] &&echo"Debug|Updating from language(s) '$(echo $striptracks_videofile_info| jq -crM "[.languages[].name] | join(\",\")")' to '$(echo $striptracks_json_languages| jq -crM "[.[].name] | join(\",\")")'. Calling ${striptracks_type^} API using PUT and URL '$url' with data $data"| log
@@ -818,8 +818,8 @@ function set_radarr_language {
818
818
fi
819
819
return$striptracks_return
820
820
}
821
-
# Set video language in Sonarr
822
-
functionset_sonarr_language {
821
+
# Set video language in Sonarr v3
822
+
functionset_legacy_sonarr_language {
823
823
local url="$striptracks_api_url/$striptracks_videofile_api/editor"
824
824
local data="{\"${striptracks_videofile_api}Ids\":[${striptracks_videofile_id}],\"language\":$(echo $striptracks_json_languages| jq -crM ".[0]")}"
825
825
[ $striptracks_debug-ge 1 ] &&echo"Debug|Updating from language '$(echo $striptracks_videofile_info| jq -crM ".language.name")' to '$(echo $striptracks_json_languages| jq -crM ".[0].name")'. Calling ${striptracks_type^} API using PUT and URL '$url' with data $data"| log
0 commit comments