Add tdarrSkipTest logic

make-only-subtitle-default
HaveAGitGat 4 years ago
parent fa2b0abd92
commit 275025ece8

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_00td_action_add_audio_stream_codec',
Stage: 'Pre-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_00td_action_handbrake_basic_options',
Stage: 'Pre-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_00td_action_handbrake_ffmpeg_custom',
Stage: 'Pre-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_00td_action_keep_one_audio_stream',
Stage: 'Pre-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_00td_action_re_order_all_streams_v2',
Stage: 'Pre-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_00td_action_remux_container',
Stage: 'Pre-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_00td_action_standardise_audio_stream_codecs',
Stage: 'Pre-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_00td_filter_by_bitrate',
Stage: 'Pre-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_00td_filter_by_resolution',
Stage: 'Pre-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_00td_filter_by_size',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_075a_FFMPEG_HEVC_Generic',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => ({
id: "Tdarr_Plugin_075a_Transcode_Customisable",
Stage: "Pre-processing",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_075b_FFMPEG_HEVC_Generic_Video_Audio_Only",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_075c_FFMPEG_HEVC_Generic_Video_Audio_Only_CRF20",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_075d_FFMPEG_HEVC_GPU_Generic_Video_Audio_Only_CRF20",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_076a_re_order_audio_streams",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_076b_re_order_subtitle_streams",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_077b_HandBrake_NVENC_264_Configurable",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_078d_Output_embedded_subs_to_SRT_and_remove",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: 'Tdarr_Plugin_43az_add_to_radarr',

@ -1,6 +1,7 @@
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
/* eslint-disable no-restricted-globals */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_A47j_FFMPEG_NVENC_HEVC_Video_Only',
Stage: 'Pre-processing',

@ -1,5 +1,6 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_DOOM_NVENC_Tiered_MKV_CleanAll",

@ -4,6 +4,7 @@
/* eslint no-bitwise: 0 */
/* eslint no-mixed-operators: 0 */
// tdarrSkipTest
const details = () => {
return {
id: 'Tdarr_Plugin_ER01_Transcode audio and video with HW (PC and Mac)',

@ -1,4 +1,5 @@
module.exports.dependencies = ['import-fresh'];
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_Greg_MP3_FFMPEG_CPU',
Stage: 'Pre-processing',

@ -86,6 +86,7 @@ Audio: (Only one audio stream is used!!)
/// ///////////////////////////////////////////////////////////////////////////////////////////////////
*/
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_JB69_JBHEVCQSV_MinimalFile',
Stage: 'Pre-processing',

@ -148,6 +148,7 @@
//
//////////////////////////////////////////////////////////////////////////////////////////////////////
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_JB69_JBHEVCQSZ_PostFix",

@ -1,4 +1,5 @@
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_MC93_Migz1FFMPEG',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_MC93_Migz1FFMPEG_CPU',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_MC93_Migz1Remux',
Stage: 'Pre-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_MC93_Migz2CleanTitle',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_MC93_Migz3CleanAudio',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_MC93_Migz4CleanSubs',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_MC93_Migz5ConvertAudio',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_MC93_Migz6OrderStreams',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_MC93_MigzImageRemoval',
Stage: 'Pre-processing',

@ -3,6 +3,7 @@ module.exports.dependencies = [
];
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_MC93_MigzPlex_Autoscan',
Stage: 'Post-processing',

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_MP01_MichPasCleanSubsAndAudioCodecs",

@ -1,6 +1,7 @@
/* eslint-disable */
const vaapiPrefix = ` -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi `;
// tdarrSkipTest
const details = () => {
return {
id: `Tdarr_Plugin_Mthr_VaapiHEVCTranscode`,

@ -14,6 +14,7 @@
var secondPass = false;
var logOutFile = '';
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_NIfPZuCLU_2_Pass_Loudnorm_Audio_Normalisation",

@ -1,6 +1,7 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_O8O0dCTlb_Set_File_Permissions_For_UnRaid",

@ -3,6 +3,7 @@
// https://github.com/HaveAGitGat/Tdarr_Plugins/blob/master/Community/Tdarr_Plugin_MC93_Migz1FFMPEG.js
// Seriously, all I did was make it work for converting things to h264 instead of hevc
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_SV6x_Smoove1FFMPEG_NVENC_H264',
Stage: 'Pre-processing', // Preprocessing or Post-processing. Determines when the plugin will be executed.

@ -4,6 +4,7 @@ module.exports.dependencies = [
];
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_TD01_TOAD_Autoscan',
Stage: 'Post-processing',

@ -1,4 +1,5 @@
/* eslint max-classes-per-file: ["error", 2] */
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_VP92_VP9_Match_Bitrate_One_Pass',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_a37x_Drawmonster_MP4_No_Title_Meta",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_a8hc_HaveAGitGat_HandBrake_H264_VeryFast1080p30",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_a9hc_HaveAGitGat_HandBrake_H264_Fast1080p30",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_a9hd_FFMPEG_Transcode_Specific_Audio_Stream_Codecs",

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_a9he_New_file_size_check',
Stage: 'Pre-processing',

@ -1,5 +1,6 @@
// eslint-disable-next-line import/no-unresolved
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_a9hf_New_file_duration_check',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_b38x_Nosirus_h265_aac_no_meta",

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_b39x_the1poet_surround_sound_to_ac3',
Stage: 'Pre-processing',

@ -10,6 +10,7 @@
// eslint-disable-next-line max-len
// https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/cloud-computing-quicksync-video-ffmpeg-white-paper.pdf
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_bsh1_Boosh_FFMPEG_QSV_HEVC',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_c0r1_SetDefaultAudioStream",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_d5d3_iiDrakeii_FFMPEG_NVENC_Tiered_MKV",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_d5d4_iiDrakeii_Not_A_Video_Mjpeg_Fix",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_da11_Dallas_FFmpeg_Presets_H264_MP4",

@ -1,5 +1,6 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_drdd_standardise_all_in_one",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_e3jc_Tharic_H.264_MKV_480p30_No_Subs_No_Title_Meta",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_e3jd_Tharic_H.264_MKV_720p30_No_Subs_No_Title_Meta",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_e3je_Tharic_H.264_MKV_1080p30_No_Subs_No_Title_Meta",

@ -1,5 +1,6 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_e5c3_CnT_Add_Subtitles",

@ -1,5 +1,6 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_e5c3_CnT_Keep_Preferred_Audio",

@ -1,5 +1,6 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_e5c3_CnT_Remove_Letterbox",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_fd5T_Sparticus_4K_AC3_No_Subs",

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_goof1_URL_Plex_Refresh',
Stage: 'Post-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_henk_Add_Specific_Audio_Codec',
Stage: 'Pre-processing',

@ -1,5 +1,6 @@
/* eslint-disable no-await-in-loop */
module.exports.dependencies = ['axios', '@cospired/i18n-iso-languages'];
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_henk_Keep_Native_Lang_Plus_Eng',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_hk75_Drawmonster_MP4_AAC_No_Subs_No_metaTitle",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_hk76_GilbN_MP4_AAC_No_metaTitle",

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_jeons001_Downmix_to_stereo_and_apply_DRC',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_lmg1_Reorder_Streams",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_nc7x_Drawmonster_No_Title_Meta",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_r002_rootuser_FFMPEG_HQ_HEVC_MKV_Animation",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_raf4_Floorpie_FFmpeg_Tiered_HEVC_MKV",

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_rr01_drpeppershaker_extract_subs_to_SRT',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_s710_nick_h265_nvenc_4K",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_s7x8_winsome_h265",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_s7x9_winsome_h265_10bit",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_s7x9_winsome_h265_nvenc",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_sdd3_Remove_Commentary_Tracks",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_sdf5_Thierrrrry_Remove_Non_English_Audio",

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_vdka_Remove_DataStreams",

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_vdka_Tiered_CPU_CRF_Based_Configurable',
Stage: 'Pre-processing',

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: 'Tdarr_Plugin_vdka_Tiered_NVENC_CQV_BASED_CONFIGURABLE',

@ -1,4 +1,5 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_x7ab_Remove_Subs",

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_x7ac_Remove_Closed_Captions',
Stage: 'Pre-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_z0ab_TheRealShadoh_FFmpeg_Subs_H264_Medium',
Stage: 'Pre-processing',

@ -1,5 +1,6 @@
/* eslint-disable */
// tdarrSkipTest
const details = () => {
return {
id: "Tdarr_Plugin_z18s_rename_files_based_on_codec",

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_z18t_rename_files_based_on_codec_and_resolution',
Stage: 'Post-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_z1ab_TheRealShadoh_FFmpeg_Subs_H264_Fast',
Stage: 'Pre-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_z2ab_TheRealShadoh_FFmpeg_Subs_H264_Slow',
Stage: 'Pre-processing',

@ -1,3 +1,4 @@
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_z3ab_TheRealShadoh_FFmpeg_Subs_H264_VeryFast',
Stage: 'Pre-processing',

@ -4,6 +4,7 @@ module.exports.dependencies = [
'touch',
];
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_z80t_keep_original_date',
Stage: 'Post-processing',

@ -3,28 +3,47 @@
const fs = require('fs');
const childProcess = require('child_process');
const filenames = fs.readdirSync(`${__dirname}/Community`);
const filenames = fs.readdirSync(`${process.cwd()}/Community`);
const run = async () => {
for (let i = 0; i < filenames.length; i += 1) {
const path = `${__dirname}/Community/${filenames[i]}`;
// eslint-disable-next-line no-await-in-loop
await new Promise((resolve) => {
childProcess.exec(`node ${path}`, (err, stdout, stderr) => {
if (err) {
console.log(err);
}
console.log(stdout);
console.log(stderr);
}).on('exit', async (code) => {
if (code !== 0) {
await new Promise((resolve2) => setTimeout(resolve2, 1000));
process.exit(1);
} else {
resolve();
}
const pluginPath = `${process.cwd()}/Community/${filenames[i]}`;
const text = fs.readFileSync(pluginPath);
const pluginTestpath = `${__dirname}/Community/${filenames[i]}`;
let shouldRunTest = true;
if (!text.includes('// tdarrSkipTest') && !fs.existsSync(pluginTestpath)) {
console.log(`${filenames[i]} does not have a test but should do.`);
process.exit(1);
} else if (!text.includes('// tdarrSkipTest') && fs.existsSync(pluginTestpath)) {
console.log(`${filenames[i]} running test`);
} else if (text.includes('// tdarrSkipTest') && fs.existsSync(pluginTestpath)) {
console.log(`${filenames[i]} should have // tdarrSkipTest removed`);
process.exit(1);
} else if (text.includes('// tdarrSkipTest') && !fs.existsSync(pluginTestpath)) {
console.log(`${filenames[i]} skipping tests`);
shouldRunTest = false;
}
if (shouldRunTest) {
// eslint-disable-next-line no-await-in-loop
await new Promise((resolve) => {
childProcess.exec(`node ${pluginTestpath}`, (err, stdout, stderr) => {
if (err) {
console.log(err);
}
console.log(stdout);
console.log(stderr);
}).on('exit', async (code) => {
if (code !== 0) {
await new Promise((resolve2) => setTimeout(resolve2, 1000));
process.exit(1);
} else {
resolve();
}
});
});
});
}
}
};

Loading…
Cancel
Save