mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 07:29:04 -07:00
Add Tdarr_Plugin_00td_filter_by_file_property
This commit is contained in:
parent
f1243739af
commit
5746b8a0b6
2 changed files with 282 additions and 0 deletions
166
tests/Community/Tdarr_Plugin_00td_filter_by_file_property.js
Normal file
166
tests/Community/Tdarr_Plugin_00td_filter_by_file_property.js
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
/* eslint max-len: 0 */
|
||||
const _ = require('lodash');
|
||||
const run = require('../helpers/run');
|
||||
|
||||
const tests = [
|
||||
{
|
||||
input: {
|
||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
|
||||
librarySettings: {},
|
||||
inputs: {},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: {
|
||||
processFile: false,
|
||||
infoLog: 'File property container of mkv being one of mkv,mp4 has been found, breaking out of stack \n',
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
input: {
|
||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
propertyName: 'container',
|
||||
propertyValues: 'avi',
|
||||
continueIfPropertyFound: false,
|
||||
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: {
|
||||
processFile: true,
|
||||
infoLog: 'File property container of mkv being one of avi has not been found, continuing to next plugin \n',
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
input: {
|
||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
propertyName: 'container',
|
||||
propertyValues: 'mkv',
|
||||
continueIfPropertyFound: false,
|
||||
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: {
|
||||
processFile: false,
|
||||
infoLog: 'File property container of mkv being one of mkv has been found, breaking out of stack \n',
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
input: {
|
||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
propertyName: 'video_resolution',
|
||||
propertyValues: '720p,1080p',
|
||||
continueIfPropertyFound: false,
|
||||
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: {
|
||||
processFile: false,
|
||||
infoLog: 'File property video_resolution of 1080p being one of 720p,1080p has been found, breaking out of stack \n',
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
input: {
|
||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
propertyName: 'video_resolution',
|
||||
propertyValues: '721p,1081p',
|
||||
continueIfPropertyFound: false,
|
||||
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: {
|
||||
processFile: true,
|
||||
infoLog: 'File property video_resolution of 1080p being one of 721p,1081p has not been found, continuing to next plugin \n',
|
||||
},
|
||||
},
|
||||
|
||||
// // continueIfPropertyFound: true
|
||||
|
||||
{
|
||||
input: {
|
||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
propertyName: 'container',
|
||||
propertyValues: 'avi',
|
||||
continueIfPropertyFound: true,
|
||||
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: {
|
||||
processFile: false,
|
||||
infoLog: 'File property container of mkv being one of avi has not been found, breaking out of stack \n',
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
input: {
|
||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
propertyName: 'container',
|
||||
propertyValues: 'mkv',
|
||||
continueIfPropertyFound: true,
|
||||
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: {
|
||||
processFile: true,
|
||||
infoLog: 'File property container of mkv being one of mkv has been found, continuing to next plugin \n',
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
input: {
|
||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
propertyName: 'container',
|
||||
propertyValues: 'mkv,mp4',
|
||||
continueIfPropertyFound: true,
|
||||
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: {
|
||||
processFile: true,
|
||||
infoLog: 'File property container of mkv being one of mkv,mp4 has been found, continuing to next plugin \n',
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
input: {
|
||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_2.json')),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
propertyName: 'video_resolution',
|
||||
propertyValues: '721p,1081p',
|
||||
continueIfPropertyFound: true,
|
||||
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: {
|
||||
processFile: false,
|
||||
infoLog: 'File property video_resolution of 1080p being one of 721p,1081p has not been found, breaking out of stack \n',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
run(tests);
|
||||
Loading…
Add table
Add a link
Reference in a new issue