From 8f123d18a2e654fba3490b0794ce34f7df137b9c Mon Sep 17 00:00:00 2001 From: Migz93 <33037112+Migz93@users.noreply.github.com> Date: Sat, 23 May 2020 12:19:57 +0100 Subject: [PATCH 1/4] Migz Plugins Change both ffmpeg plugins reQueueAfter to false. These plugins should not need to be requeued and worked on again. Move mkv data stream check to after extraArguments var creation so that it works as intended. --- Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js | 12 ++++++------ Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js b/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js index fa86c44..b43ec57 100644 --- a/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js +++ b/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js @@ -48,7 +48,7 @@ function plugin(file, librarySettings, inputs) { preset: "", handBrakeMode: false, FFmpegMode: true, - reQueueAfter: true, + reQueueAfter: false, infoLog: "", }; @@ -62,11 +62,6 @@ function plugin(file, librarySettings, inputs) { response.container = "." + inputs.container; } - // Check if file is MKV, if so then add extra argument to drop data. MKV does not support data streams. - if (inputs.container == "mkv") { - extraArguments += "-map -0:d "; - } - // Check if file is a video. If it isn't then exit plugin. if (file.fileMedium !== "video") { response.processFile = false; @@ -111,6 +106,11 @@ function plugin(file, librarySettings, inputs) { } } + // Check if file is MKV, if so then add extra argument to drop data. MKV does not support data streams. + if (inputs.container == "mkv") { + extraArguments += "-map -0:d "; + } + // Check if 10bit variable is true. if (inputs.enable_10bit == "true") { // If set to true then add 10bit argument diff --git a/Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js b/Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js index e3ae07b..2e2d2d6 100644 --- a/Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js +++ b/Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js @@ -48,7 +48,7 @@ function plugin(file, librarySettings, inputs) { preset: "", handBrakeMode: false, FFmpegMode: true, - reQueueAfter: true, + reQueueAfter: false, infoLog: "", }; @@ -62,11 +62,6 @@ function plugin(file, librarySettings, inputs) { response.container = "." + inputs.container; } - // Check if file is MKV, if so then add extra argument to drop data. MKV does not support data streams. - if (inputs.container == "mkv") { - extraArguments += "-map -0:d "; - } - // Check if file is a video. If it isn't then exit plugin. if (file.fileMedium !== "video") { response.processFile = false; @@ -111,6 +106,11 @@ function plugin(file, librarySettings, inputs) { } } + // Check if file is MKV, if so then add extra argument to drop data. MKV does not support data streams. + if (inputs.container == "mkv") { + extraArguments += "-map -0:d "; + } + // Check if 10bit variable is true. if (inputs.enable_10bit == "true") { // If set to true then add 10bit argument From 283611215084f79aed7d60b53dc4fa737fa75507 Mon Sep 17 00:00:00 2001 From: Migz93 <33037112+Migz93@users.noreply.github.com> Date: Sat, 23 May 2020 12:23:44 +0100 Subject: [PATCH 2/4] Migz Plugins Correct typo in CleanSubs plugin. Thanks zzeneg for spotting this. --- Community/Tdarr_Plugin_MC93_Migz4CleanSubs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Community/Tdarr_Plugin_MC93_Migz4CleanSubs.js b/Community/Tdarr_Plugin_MC93_Migz4CleanSubs.js index 6a5e25a..dd8d7c7 100644 --- a/Community/Tdarr_Plugin_MC93_Migz4CleanSubs.js +++ b/Community/Tdarr_Plugin_MC93_Migz4CleanSubs.js @@ -109,7 +109,7 @@ function plugin(file, librarySettings, inputs) { file.ffProbeData.streams[i].tags.title.toLowerCase().includes("sdh")) ) { ffmpegCommandInsert += `-map -0:s:${subtitleIdx} `; - response.infoLog += `☒Subtitle stream detected as being Commentary or Description, removing. Subtitle stream 0:s:${SubtitleIdx} - ${file.ffProbeData.streams[i].tags.title}. \n`; + response.infoLog += `☒Subtitle stream detected as being Commentary or Description, removing. Subtitle stream 0:s:${subtitleIdx} - ${file.ffProbeData.streams[i].tags.title}. \n`; convert = true; } } catch (err) {} From 029224f8620d82ec68056573f5e7fac495cd1831 Mon Sep 17 00:00:00 2001 From: Migz93 <33037112+Migz93@users.noreply.github.com> Date: Sat, 23 May 2020 12:25:26 +0100 Subject: [PATCH 3/4] Migz Plugins Updated mkv data check from "" to `` for consistency. --- Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js | 2 +- Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js b/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js index b43ec57..57acfb6 100644 --- a/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js +++ b/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js @@ -108,7 +108,7 @@ function plugin(file, librarySettings, inputs) { // Check if file is MKV, if so then add extra argument to drop data. MKV does not support data streams. if (inputs.container == "mkv") { - extraArguments += "-map -0:d "; + extraArguments += `-map -0:d `; } // Check if 10bit variable is true. diff --git a/Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js b/Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js index 2e2d2d6..323dfa9 100644 --- a/Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js +++ b/Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js @@ -108,7 +108,7 @@ function plugin(file, librarySettings, inputs) { // Check if file is MKV, if so then add extra argument to drop data. MKV does not support data streams. if (inputs.container == "mkv") { - extraArguments += "-map -0:d "; + extraArguments += `-map -0:d `; } // Check if 10bit variable is true. From 0066d4497cf38638b91260b38e822b98d0cf051e Mon Sep 17 00:00:00 2001 From: Migz93 <33037112+Migz93@users.noreply.github.com> Date: Mon, 25 May 2020 01:22:09 +0100 Subject: [PATCH 4/4] Migz Plugins Set reQueueAfter back to true after explanation from GitGAt --- Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js | 2 +- Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js b/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js index 57acfb6..726ec05 100644 --- a/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js +++ b/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js @@ -48,7 +48,7 @@ function plugin(file, librarySettings, inputs) { preset: "", handBrakeMode: false, FFmpegMode: true, - reQueueAfter: false, + reQueueAfter: true, infoLog: "", }; diff --git a/Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js b/Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js index 323dfa9..38488c3 100644 --- a/Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js +++ b/Community/Tdarr_Plugin_MC93_Migz1FFMPEG_CPU.js @@ -48,7 +48,7 @@ function plugin(file, librarySettings, inputs) { preset: "", handBrakeMode: false, FFmpegMode: true, - reQueueAfter: false, + reQueueAfter: true, infoLog: "", };