From d636c967a24893d532473c185f16dde68549a30c Mon Sep 17 00:00:00 2001 From: Jack Dallas <3620144+JackDallas@users.noreply.github.com> Date: Thu, 30 Jan 2020 11:24:50 +0000 Subject: [PATCH] Fix remaining TheRealShadoh plugins --- ...1ab_TheRealShadoh_FFmpeg_Subs_H264_Fast.js | 20 +++++++++---------- ...2ab_TheRealShadoh_FFmpeg_Subs_H264_Slow.js | 18 ++++++++--------- ...TheRealShadoh_FFmpeg_Subs_H264_VeryFast.js | 16 +++++++-------- 3 files changed, 24 insertions(+), 30 deletions(-) diff --git a/Community/Tdarr_Plugin_z1ab_TheRealShadoh_FFmpeg_Subs_H264_Fast.js b/Community/Tdarr_Plugin_z1ab_TheRealShadoh_FFmpeg_Subs_H264_Fast.js index ea42d6c..c4a2292 100644 --- a/Community/Tdarr_Plugin_z1ab_TheRealShadoh_FFmpeg_Subs_H264_Fast.js +++ b/Community/Tdarr_Plugin_z1ab_TheRealShadoh_FFmpeg_Subs_H264_Fast.js @@ -53,12 +53,10 @@ function plugin(file) { for (var i = 0; i < file.ffProbeData.streams.length; i++) { try { - - if(file.ffProbeData.streams[i].codec_type.toLowerCase() == "subtitle"){ - - hasSubs = true - - } + let streamData = file.ffProbeData.streams[i]; + if(streamData.codec_type.toLowerCase() == "subtitle" && streamData.codec_name != "mov_text"){ + hasSubs = true + } } catch (err) { } } @@ -121,7 +119,7 @@ function plugin(file) { response.FFmpegMode = true return response }else{ - response.infoLog += "☑File has no title metadata" + response.infoLog += "☑File has no title metadata \n" } if(!jsonString.includes("aac")){ @@ -138,16 +136,16 @@ function plugin(file) { } if(hasSubs){ - - response.infoLog += "☒File has subs \n" + + response.infoLog += "☒File has incompatible subs \n" response.preset = ', -map 0:v -map 0:s? -map 0:a -c:v copy -c:a copy -c:s mov_text' response.reQueueAfter = true; response.processFile = true; response.FFmpegMode = true return response - }else{ - response.infoLog += "☑File has no subs \n" + }else{ + response.infoLog += "☑File has no/compatible subs \n" } response.infoLog += "☑File meets conditions! \n" diff --git a/Community/Tdarr_Plugin_z2ab_TheRealShadoh_FFmpeg_Subs_H264_Slow.js b/Community/Tdarr_Plugin_z2ab_TheRealShadoh_FFmpeg_Subs_H264_Slow.js index acb940d..5dba5ec 100644 --- a/Community/Tdarr_Plugin_z2ab_TheRealShadoh_FFmpeg_Subs_H264_Slow.js +++ b/Community/Tdarr_Plugin_z2ab_TheRealShadoh_FFmpeg_Subs_H264_Slow.js @@ -53,12 +53,10 @@ function plugin(file) { for (var i = 0; i < file.ffProbeData.streams.length; i++) { try { - - if(file.ffProbeData.streams[i].codec_type.toLowerCase() == "subtitle"){ - - hasSubs = true - - } + let streamData = file.ffProbeData.streams[i]; + if(streamData.codec_type.toLowerCase() == "subtitle" && streamData.codec_name != "mov_text"){ + hasSubs = true + } } catch (err) { } } @@ -122,7 +120,7 @@ function plugin(file) { response.FFmpegMode = true return response }else{ - response.infoLog += "☑File has no title metadata" + response.infoLog += "☑File has no title metadata \n" } if(!jsonString.includes("aac")){ @@ -140,15 +138,15 @@ function plugin(file) { if(hasSubs){ - response.infoLog += "☒File has subs \n" + response.infoLog += "☒File has incompatible subs \n" response.preset = ', -map 0:v -map 0:s? -map 0:a -c:v copy -c:a copy -c:s mov_text' response.reQueueAfter = true; response.processFile = true; response.FFmpegMode = true return response - }else{ - response.infoLog += "☑File has no subs \n" + }else{ + response.infoLog += "☑File has no/compatible subs \n" } response.infoLog += "☑File meets conditions! \n" diff --git a/Community/Tdarr_Plugin_z3ab_TheRealShadoh_FFmpeg_Subs_H264_VeryFast.js b/Community/Tdarr_Plugin_z3ab_TheRealShadoh_FFmpeg_Subs_H264_VeryFast.js index e954cf2..68aed80 100644 --- a/Community/Tdarr_Plugin_z3ab_TheRealShadoh_FFmpeg_Subs_H264_VeryFast.js +++ b/Community/Tdarr_Plugin_z3ab_TheRealShadoh_FFmpeg_Subs_H264_VeryFast.js @@ -53,12 +53,10 @@ function plugin(file) { for (var i = 0; i < file.ffProbeData.streams.length; i++) { try { - - if(file.ffProbeData.streams[i].codec_type.toLowerCase() == "subtitle"){ - - hasSubs = true - - } + let streamData = file.ffProbeData.streams[i]; + if(streamData.codec_type.toLowerCase() == "subtitle" && streamData.codec_name != "mov_text"){ + hasSubs = true + } } catch (err) { } } @@ -122,7 +120,7 @@ function plugin(file) { response.FFmpegMode = true return response }else{ - response.infoLog += "☑File has no title metadata" + response.infoLog += "☑File has no title metadata \n" } if(!jsonString.includes("aac")){ @@ -140,7 +138,7 @@ function plugin(file) { if(hasSubs){ - response.infoLog += "☒File has subs \n" + response.infoLog += "☒File has incompatible subs \n" response.preset = ', -map 0:v -map 0:s? -map 0:a -c:v copy -c:a copy -c:s mov_text' response.reQueueAfter = true; response.processFile = true; @@ -148,7 +146,7 @@ function plugin(file) { return response }else{ - response.infoLog += "☑File has no subs \n" + response.infoLog += "☑File has no/compatible subs \n" } response.infoLog += "☑File meets conditions! \n"