From 42185644eeaf3a0051511d0de95e8c7099cbc44e Mon Sep 17 00:00:00 2001 From: Jeff Hessenflow Date: Thu, 29 Sep 2022 16:04:47 -0500 Subject: [PATCH] Swapped input.container to file.container for genpts logic Swapped input.container to file.container for genpts logic --- Community/Tdarr_Plugin_MC93_Migz1Remux.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Community/Tdarr_Plugin_MC93_Migz1Remux.js b/Community/Tdarr_Plugin_MC93_Migz1Remux.js index 994ce8c..499bc9d 100644 --- a/Community/Tdarr_Plugin_MC93_Migz1Remux.js +++ b/Community/Tdarr_Plugin_MC93_Migz1Remux.js @@ -83,11 +83,6 @@ const plugin = (file, librarySettings, inputs, otherArguments) => { let genpts = ''; let convert = false; - // If Container .ts or .avi set genpts to fix unknown timestamp - if (inputs.container.toLowerCase() === 'ts' || inputs.container.toLowerCase() === 'avi') { - genpts = '-fflags +genpts'; - } - // Check if force_conform option is checked. // If so then check streams and add any extra parameters required to make file conform with output format. if (inputs.force_conform === true) { @@ -140,6 +135,12 @@ const plugin = (file, librarySettings, inputs, otherArguments) => { response.infoLog += `☑File is already in ${inputs.container} container. \n`; return response; } + + // If Container .ts or .avi set genpts to fix unknown timestamp + if (file.container.toLowerCase() === 'ts' || file.container.toLowerCase() === 'avi') { + genpts = '-fflags +genpts'; + } + if (convert === true) { response.preset += `${genpts}, -map 0 -c copy -max_muxing_queue_size 9999 ${extraArguments}`;