Skip to content

Commit

Permalink
Merge pull request #618 from blakeblackshear/fix-media
Browse files Browse the repository at this point in the history
Fix 0.12 events media browser failure
  • Loading branch information
dermotduffy authored Feb 3, 2024
2 parents 02ab137 + 0fe132f commit e094e9e
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 e094e9e

Please sign in to comment.