{% extends "base.html" %} {% block title %}Video QC Results{% endblock %} {% block extra_head %} {% endblock %} {% block content %}

Video QC Results

Run Another
{% if error %}
{{ error }}
{% elif is_batch is defined and is_batch %} {# === BATCH RESULTS === #} {% if reports %} {% set total = reports|length %} {% set ns = namespace(passed=0, failed=0, warnings=0, score_sum=0, score_count=0) %} {% for r in reports %} {% if r.status == 'passed' %}{% set ns.passed = ns.passed + 1 %}{% endif %} {% if r.status in ['failed', 'error'] %}{% set ns.failed = ns.failed + 1 %}{% endif %} {% if r.status == 'warning' %}{% set ns.warnings = ns.warnings + 1 %}{% endif %} {% if r.score is not none %}{% set ns.score_sum = ns.score_sum + r.score %}{% set ns.score_count = ns.score_count + 1 %}{% endif %} {% endfor %} {% set avg_score = (ns.score_sum / ns.score_count)|round(1) if ns.score_count > 0 else 0 %}
{% if progress.status == 'completed' %} Batch Video QC completed: {{ total }} videos processed {% else %} Batch in progress — {{ reports|length }} video(s) completed so far {% endif %}

Batch Summary

{{ total }}
Total Videos
{{ ns.passed }}
Passed
{{ ns.failed }}
Failed
{{ ns.warnings }}
Warnings
{{ avg_score }}
Avg Score
{% if batch_id %}
Download All (ZIP)
{% endif %}

Per-Video Results

{% for report in reports %}
{{ report.filename }}
{% if report.score is not none %} {{ report.score|round(1) }} {% endif %} {{ report.status|upper }}
{% endfor %} {% endif %} {# Batch progress (still running OR no reports yet) #} {% if progress.status != 'completed' or not reports %}
{{ progress.message or 'Starting...' }} {{ progress.percent|round|int if progress.percent else 0 }}%
{% endif %} {% elif report and report.score is not none %} {# === SINGLE FILE COMPLETED === #}
{{ '%.0f' % report.score }}
{{ report.status | upper }}
Filename{{ report.filename }}
Job Number{{ report.job_number or '-' }}
Date{{ report.created_at.strftime('%Y-%m-%d %H:%M:%S') if report.created_at }}
{% if html_content %}
Detailed Report
{% endif %} {% else %} {# === SINGLE FILE IN PROGRESS === #}
Starting... 0%
{% endif %}
{% endblock %} {% block extra_scripts %} {% if not error and (not report or report.score is none) and (progress is not defined or progress.status != 'completed') %} {% endif %} {% endblock %}