From 5ac9c85c06c20e41b2d8088b58d2ab360132ff4d Mon Sep 17 00:00:00 2001 From: Migz93 <33037112+Migz93@users.noreply.github.com> Date: Sun, 9 Feb 2020 21:58:05 +0000 Subject: [PATCH] Migz Plugin: Bug Fix Resolve bug with Migz1FFMPEG where bitrate transcode targets were always displayed, even if the file already meets h265/container and isn't used. --- Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js b/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js index 381d69c..6cdd9ac 100644 --- a/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js +++ b/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js @@ -65,9 +65,6 @@ function plugin(file, librarySettings, inputs) { response.infoLog += "☒Target bitrate could not be calculated. Skipping this plugin. \n" return response } - - bitrateSettings = `-b:v ${targetBitrate}k -minrate ${minimumBitrate}k -maxrate ${maximumBitrate}k` - response.infoLog += `Container for output selected as ${inputs.container}. \n Current bitrate = ${~~(file.file_size / (duration * 0.0075))} \n Bitrate settings: \nTarget = ${targetBitrate} \nMinimum = ${minimumBitrate} \nMaximum = ${maximumBitrate} \n` if (file.ffProbeData.streams[0].codec_name == 'hevc' && file.container == inputs.container) { response.processFile = false @@ -81,6 +78,9 @@ function plugin(file, librarySettings, inputs) { response.processFile = true; return response } + + bitrateSettings = `-b:v ${targetBitrate}k -minrate ${minimumBitrate}k -maxrate ${maximumBitrate}k` + response.infoLog += `Container for output selected as ${inputs.container}. \n Current bitrate = ${~~(file.file_size / (duration * 0.0075))} \n Bitrate settings: \nTarget = ${targetBitrate} \nMinimum = ${minimumBitrate} \nMaximum = ${maximumBitrate} \n` //codec will be checked so it can be transcoded correctly if (file.video_codec_name == 'h263') {