diff --git a/Community/Tdarr_Plugin_00td_filter_by_bitrate.js b/Community/Tdarr_Plugin_00td_filter_by_bitrate.js index 5914e42..7219b51 100644 --- a/Community/Tdarr_Plugin_00td_filter_by_bitrate.js +++ b/Community/Tdarr_Plugin_00td_filter_by_bitrate.js @@ -1,4 +1,3 @@ -// tdarrSkipTest const details = () => ({ id: 'Tdarr_Plugin_00td_filter_by_bitrate', Stage: 'Pre-processing', diff --git a/tests/Community/Tdarr_Plugin_00td_filter_by_bitrate.js b/tests/Community/Tdarr_Plugin_00td_filter_by_bitrate.js new file mode 100644 index 0000000..4c22116 --- /dev/null +++ b/tests/Community/Tdarr_Plugin_00td_filter_by_bitrate.js @@ -0,0 +1,64 @@ +/* eslint max-len: 0 */ +const run = require('../helpers/run'); + +const tests = [ + { + input: { + file: require('../sampleData/media/sampleH264_2.json'), + librarySettings: {}, + inputs: {}, + otherArguments: {}, + }, + output: { + processFile: true, + infoLog: '☑File bitrate is within filter limits. Moving to next plugin.', + }, + }, + { + input: { + file: require('../sampleData/media/sampleH264_1.json'), + librarySettings: {}, + inputs: { + upperBound: 500, + lowerBound: 0, + }, + otherArguments: {}, + }, + output: { + processFile: false, + infoLog: '☒File bitrate is not within filter limits. Breaking out of plugin stack.\n', + }, + }, + { + input: { + file: require('../sampleData/media/sampleH264_1.json'), + librarySettings: {}, + inputs: { + upperBound: 10000, + lowerBound: 0, + }, + otherArguments: {}, + }, + output: { + processFile: true, + infoLog: '☑File bitrate is within filter limits. Moving to next plugin.', + }, + }, + { + input: { + file: require('../sampleData/media/sampleH264_1.json'), + librarySettings: {}, + inputs: { + upperBound: 10000, + lowerBound: 9000, + }, + otherArguments: {}, + }, + output: { + processFile: false, + infoLog: '☒File bitrate is not within filter limits. Breaking out of plugin stack.\n', + }, + }, +]; + +run(tests);