Skip to content

Commit

Permalink
feat: allow customizing frigate labels (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakowenko committed Sep 11, 2021
1 parent 157e7c7 commit 5eb100a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions api/src/constants/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = {
frigate: {
attempts: { latest: 10, snapshot: 0, mqtt: true, delay: 0 },
image: { height: 500 },
labels: ['person'],
},
mqtt: {
topics: {
Expand Down
4 changes: 2 additions & 2 deletions api/src/util/frigate.util.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ module.exports.checks = async ({
return `${id} - skip processing on ${type} events`;
}

if (label !== 'person') {
return `${id} - label not a person, ${label} found`;
if (!FRIGATE.LABELS.includes(label)) {
return `${id} - ${label} label not in (${FRIGATE.LABELS.join(', ')})`;
}

if (IDS.includes(id)) {
Expand Down

0 comments on commit 5eb100a

Please sign in to comment.