Show filters only if they actually used

This commit is contained in:
Ingo Oppermann 2022-07-21 13:45:36 +02:00
parent 67aad79bfe
commit 2f40d96412
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E

View File

@ -54,27 +54,29 @@ export default function Summary(props) {
encodingSummary = coder.summarize(profile.encoder.settings);
}
if (profile.filter.graph.length !== 0) {
let filters = null;
if (profile.encoder.coder !== 'none' && profile.encoder.coder !== 'copy') {
if (profile.filter.graph.length !== 0) {
let filters = null;
if (props.type === 'video') {
filters = Filters.Video;
} else if (props.type === 'audio') {
filters = Filters.Audio;
}
for (let filter of filters.List()) {
const name = filter.filter;
if (!(name in profile.filter.settings)) {
continue;
if (props.type === 'video') {
filters = Filters.Video;
} else if (props.type === 'audio') {
filters = Filters.Audio;
}
if (profile.filter.settings[name].graph.length === 0) {
continue;
}
for (let filter of filters.List()) {
const name = filter.filter;
filterSummary.push(filter.summarize(profile.filter.settings[name].settings));
if (!(name in profile.filter.settings)) {
continue;
}
if (profile.filter.settings[name].graph.length === 0) {
continue;
}
filterSummary.push(filter.summarize(profile.filter.settings[name].settings));
}
}
}
}