Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct frigate_event definition bug #25

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ def on_message(client, userdata, message):
_LOGGER.debug(f"duplicated snapshot from Frigate as top_score from before and after are the same: {after_data['top_score']}")
return

# get frigate event
frigate_event = after_data['id']
frigate_url = config['frigate']['frigate_url']
snapshot_url = f"{frigate_url}/api/events/{frigate_event}/snapshot.jpg"
_LOGGER.debug(f"event URL: {snapshot_url}")
Expand All @@ -235,8 +237,6 @@ def on_message(client, userdata, message):
_LOGGER.debug(f"license_plate attribute score is below minimum: {license_plate_attribute[0]['score']}")
return

# get frigate event
frigate_event = after_data['id']

# see if we have already processed this event
conn = sqlite3.connect(DB_PATH)
Expand Down
Loading