mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
Bug fix
This commit is contained in:
parent
a4fe115a7c
commit
f41d245c0f
1 changed files with 6 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ function details() {
|
|||
id: "Tdarr_Plugin_sdd3_Remove_Commentary_Tracks",
|
||||
Name: "Remove video commentary tracks",
|
||||
Type: "Video",
|
||||
Operation:"Remux",
|
||||
Operation: "Remux",
|
||||
Description: `[Contains built-in filter] If commentary tracks are detected, they will be removed. \n\n`,
|
||||
Version: "1.00",
|
||||
Link: "https://github.com/HaveAGitGat/Tdarr_Plugins/blob/master/Community/Tdarr_Plugin_sdd3_Remove_Commentary_Tracks.js"
|
||||
|
|
@ -44,6 +44,7 @@ function plugin(file) {
|
|||
|
||||
var audioIdx = -1
|
||||
var hasCommentaryTrack = false
|
||||
var ffmpegCommandInsert = ""
|
||||
|
||||
|
||||
for (var i = 0; i < file.ffProbeData.streams.length; i++) {
|
||||
|
|
@ -59,11 +60,14 @@ function plugin(file) {
|
|||
//check if commentary track and passing audio stream number
|
||||
try {
|
||||
if (file.ffProbeData.streams[i].codec_type.toLowerCase() == "audio" && file.ffProbeData.streams[i].tags.title.toLowerCase().includes("commentary")) {
|
||||
|
||||
|
||||
ffmpegCommandInsert += ` -map -0:a:${audioIdx}`
|
||||
hasCommentaryTrack = true
|
||||
|
||||
}
|
||||
} catch (err) { }
|
||||
} catch (err) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue