{% extends "utilities/_base.html" %} {% from "components/job_section.html" import job_section with context %} {% from "components/run_history.html" import run_history_list with context %} {% from "components/page_header.html" import page_header %} {% block title %}{{ _("Index Photos - Utilities - Yaffo") }}{% endblock %} {% block utility_content %}
{% set header_actions %} {# Shown by JS once the scan finds work to do. #} {# Always available: unlike Sync, this re-runs indexing on files already indexed — a rebuild, not a reconcile. It re-detects faces, so it confirms the loss of person assignments first. #} {% endset %} {{ page_header( _('Index Photos'), _('Compare photos on the file system with the database'), actions=header_actions, ) }} {% if warnings|length > 0 %}
{% for warning in warnings %}
{{ warning.message }} {% if warning.type == 'error' %} {{ _("Go to Settings") }} {% endif %}
{% endfor %}
{% endif %} {# The latest import and index runs while in progress. One that finishes while the page is open keeps its card until reload, then it's in the run history, so no Dismiss (it deletes the job). #} {{ job_section(in_progress_jobs, show_cancel=true, show_dismiss=false) }} {% if media_dirs|length > 0 %}
{{ _("Total on Filesystem") }}
—
{{ _("Imported in Database") }}
—
{{ _("Indexed in Database") }}
—
{{ _("Not Indexed") }}
—
{{ _("Orphaned in DB") }}
—
{# A warning the scan finds: media folders that hold no media files. #} {# JS fills this with the unindexed / orphaned tables (or an "in sync" state) once the scan stream completes. #}
{% endif %} {% if media_dirs|length == 0 %}

{{ _("No Media Directories Configured") }}

{% trans settings_url=url_for('settings_index') %} Please configure media directories in Settings to start indexing photos. {% endtrans %}

{% endif %} {% if run_history %}

{{ _("Run history") }}

{{ run_history_list(run_history, url_for('utilities_index_photos'), show_label=true) }}
{% endif %}
{% endblock %} {% block scripts %} {% endblock %}