diff --git a/Tdarr_Plugin_gabehf_Prefer_Honorific_Subs.js b/Tdarr_Plugin_gabehf_Prefer_Honorific_Subs.js index 7932fd5..edc9422 100644 --- a/Tdarr_Plugin_gabehf_Prefer_Honorific_Subs.js +++ b/Tdarr_Plugin_gabehf_Prefer_Honorific_Subs.js @@ -45,13 +45,8 @@ const plugin = (file, librarySettings, inputs, otherArguments) => { for (let i = 0; i < file.ffProbeData.streams.length; i++) { try { if (file.ffProbeData.streams[i].codec_type.toLowerCase() === 'subtitle') { - if (["honorific", "weeb"].some((s) => file.ffProbeData.streams[i].tags.title.toLowerCase().includes(s)) - || file.ffprobeData.streams[i].tags.language.toLowerCase() === 'enm' + if ((["honorific", "weeb"].some((s) => file.ffProbeData.streams[i].tags.title.toLowerCase().includes(s)) || file.ffProbeData.streams[i].tags.language.toLowerCase() === 'enm') && !convert ) { - if (convert) { - // handle case where an honorific was already found - continue - } response.infoLog += `☒Subtitle with id ${subtitleIdx} detected as being honorific, setting default. \n` convert = true ffmpegCommandInsert += `-disposition:s:${subtitleIdx} default `