Skip to content

Commit

Permalink
Fix media source
Browse files Browse the repository at this point in the history
blakeblackshear/frigate#6320 changed the events
API to move box, region, score and top_score into a "data" sub-struct
  • Loading branch information
madsciencetist committed Jul 25, 2023
1 parent dead665 commit 22bf17a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/frigate/media_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ def _build_event_response(
),
media_class=identifier.media_class,
media_content_type=identifier.media_type,
title=f"{dt.datetime.fromtimestamp(event['start_time'], DEFAULT_TIME_ZONE).strftime(DATE_STR_FORMAT)} [{duration}s, {event['label'].capitalize()} {int(event['top_score']*100)}%]",
title=f"{dt.datetime.fromtimestamp(event['start_time'], DEFAULT_TIME_ZONE).strftime(DATE_STR_FORMAT)} [{duration}s, {event['label'].capitalize()} {int(event['data']['top_score']*100)}%]",
can_play=identifier.media_type == MEDIA_TYPE_VIDEO,
can_expand=False,
thumbnail=f"/api/frigate/{identifier.frigate_instance_id}/thumbnail/{event['id']}",
Expand Down

0 comments on commit 22bf17a

Please sign in to comment.