{# One library card — used by the home grid and the timeline view, so the
favorite toggle, hover details, and video affordances can never diverge
between them. #}
{% macro photo_card(media_item) %}
{% if media_item.media_type == 'video' %}
{# Play badge only on browser-playable videos (it triggers inline
play). Non-playable videos show just the poster; the card click
opens the detail view, which offers "open externally". #}
{% if is_browser_playable_video(media_item.full_file_path) %}
{% endif %}
{% if media_item.duration_seconds %}
{{ media_item.duration_seconds | format_duration }}
{% endif %}
{% else %}
{% endif %}
{{ _("Name") }}
{{ media_item.file_name }}
{{ _("Folder") }}
{{ media_item.folder }}
{{ _("Taken") }}
{{ media_item.date_taken | format_date('datetime') if media_item.date_taken else _("Unknown date") }}
{% if media_item.location_name %}
{{ _("Location") }}
{{ media_item.location_name }}
{% endif %}
{% if media_item.latitude is not none and media_item.longitude is not none %}