Skip to content

Commit

Permalink
Fix 0.12 events media browser failure
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 authored Feb 2, 2024
1 parent 02ab137 commit 6977c1a
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 @@ -857,7 +857,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['data']['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']?.get('top_score') or event['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 6977c1a

Please sign in to comment.