Add exactMatch option to property filters

This commit is contained in:
HaveAGitGat 2023-05-08 20:09:55 +01:00
parent c00dfa7d9e
commit 62ef9e7ad8
5 changed files with 109 additions and 15 deletions

View file

@ -96,6 +96,7 @@ const tests = [
propertyName: 'file',
propertyValues: 'Source Folder/h264.mkv',
continueIfPropertyFound: false,
exactMatch: false,
},
otherArguments: {},
@ -188,7 +189,7 @@ const tests = [
propertyName: 'file',
propertyValues: 'Source Folder/h264.mkv',
continueIfPropertyFound: true,
exactMatch: false,
},
otherArguments: {},
},

View file

@ -100,6 +100,28 @@ const tests = [
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH265_1.json'));
file.ffProbeData.streams[0].tags.COPYRIGHT = 'processed';
return file;
})(),
librarySettings: {},
inputs: {
tagName: 'COPYRIGHT',
tagValues: 'proc,proce',
continueIfTagFound: false,
exactMatch: false,
},
otherArguments: {},
},
output: {
processFile: false,
infoLog: 'A stream with tag name COPYRIGHT containing proc,proce has been found, breaking out of stack \n',
},
},
// continueIfTagFound: true
{
@ -185,6 +207,29 @@ const tests = [
infoLog: 'A stream with tag name COPYRIGHT containing proc,proce has not been found, breaking out of stack \n',
},
},
{
input: {
file: (() => {
const file = _.cloneDeep(require('../sampleData/media/sampleH265_1.json'));
file.ffProbeData.streams[0].tags.COPYRIGHT = 'processed';
return file;
})(),
librarySettings: {},
inputs: {
tagName: 'COPYRIGHT',
tagValues: 'proc,proce',
continueIfTagFound: true,
exactMatch: false,
},
otherArguments: {},
},
output: {
processFile: true,
infoLog: 'A stream with tag name COPYRIGHT containing proc,proce has been found, continuing to next plugin \n',
},
},
];
run(tests);