{% extends "base.html" %} {% from "fragments/_chips.html" import chip, needs_you_chip %} {% block title %}Voxint — media{% endblock %} {% block cb_breadcrumb %}media /{% endblock %} {% block cb_summary %} {%- if media_summary.folder_count %}{{ media_summary.folder_count }} folder{{ "s" if media_summary.folder_count != 1 else "" }} · {% endif -%} {{ media_summary.file_count }} recording{{ "s" if media_summary.file_count != 1 else "" }} · {{ media_summary.total_hours }} {%- endblock %} {% block cb_actions %} {% if not archived and not trashed %}
{% endif %} {% endblock %} {% block body %} {# Status chip for a media item — shared by table rows and cards to prevent drift. #} {% macro media_status(row) %} {%- if row.latest_run_id -%} {%- if row.unresolved_count -%} {{ needs_you_chip(row.unresolved_count) }} {%- elif row.latest_run_status == "completed" -%} {{ chip("reviewed") }} {%- else -%} {{ chip(humanize_status(row.latest_run_status)) }} {%- endif -%} {%- else -%}{%- endif -%} {% endmacro %} {# Card macro for a single media item in cards view. #} {% macro media_card(row) %}
  • {{ format_duration(row.duration_seconds) }} {% if row.latest_run_id %} {{ friendly_media_label(row.source_title, row.source_path) }} {% else %} {{ friendly_media_label(row.source_title, row.source_path) }} {% endif %}
    {{ media_status(row) }} {% if row.id in missing_file_ids %}File missing{% endif %}

    {% if trashed and row.trashed_at %}{{ format_age(row.trashed_at, now=now) }} {% else %}{{ format_age(row.added_at, now=now) }}{% endif %}

  • {% endmacro %} {# The settings-folder picker is shared by the upload and URL forms. #} {% macro folder_picker(select_id) %} {% endmacro %} {% if trashed %}

    Trashed files awaiting permanent deletion. ← Back to active media

    {% elif archived %}

    Archived runs are hidden from the active library. ← Back to active media

    {% endif %} {% if notice %}

    {{ notice.text }}

    {% endif %} {% if not archived and not trashed %} {% if submitted %}

    {% if submitted == "deferred" %}Queued for transcription. It will start when the worker is available. {% else %}Queued for transcription.{% endif %}

    {% endif %} {% endif %} {% if rows %}
    {% if open_folder_id is defined and open_folder_id %} {% endif %} {% if not archived and not trashed %} {% endif %}
    {% if not trashed and not archived %} Archived → Trash → {% elif archived %} Trash → {% endif %}
    {% if view == "table" %}
    NAME ITEMS LENGTH REVIEW {% if trashed %}TRASHED{% endif %}
    {% for group in folder_groups %}
    {{ group.folder_path }} {% if not archived and not trashed %}{{ chip("watched") }}{% endif %} {{ group.item_count }} {{ format_compact_duration(group.total_duration_seconds) }} {% if group.failed_count %} {{ group.failed_count }} failed {% elif group.running_count %} {{ chip("transcribing") }} {% elif group.needs_review_count %} {# Folder-level chip: counts RECORDINGS, not voices, so it stays noun-less and outside needs_you_chip (which owns the voice copy). #} {{ group.needs_review_count }} need{{ "s" if group.needs_review_count == 1 else "" }} you {% elif group.completed_count == group.item_count and group.item_count > 0 %} {{ chip("all reviewed") }} {% else %} {% endif %} {% if group.latest_date %}{{ format_age(group.latest_date, now=now) }}{% endif %} Open →
    {% for row in group.items %} {% endfor %} {% endfor %} {% for row in ungrouped_items %}
    {{ friendly_media_label(row.source_title, row.source_path) }} {% if row.id in missing_file_ids %}File missing{% endif %} {{ format_duration(row.duration_seconds) }} {{ media_status(row) }} {% if trashed and row.trashed_at %}{{ format_age(row.trashed_at, now=now) }} {% else %}{{ format_age(row.added_at, now=now) }}{% endif %} {% if row.latest_run_id %} View → {% endif %}
    {% endfor %}
    {% else %} {# --- Cards view ---------------------------------------------------- #} {% if active_folder is defined and active_folder %} {# Drill-down: showing a single folder's items as a list. #} All folders

    {{ active_folder.folder_path }} {{ active_folder.item_count }} recording{{ "s" if active_folder.item_count != 1 }} · {{ format_compact_duration(active_folder.total_duration_seconds) }}

    NAME LENGTH REVIEW
    {% for row in active_folder.items %}
    {{ friendly_media_label(row.source_title, row.source_path) }} {% if row.id in missing_file_ids %}File missing{% endif %} {{ format_duration(row.duration_seconds) }} {{ media_status(row) }} {% if row.latest_run_id %} View → {% endif %}
    {% else %}
    No recordings in this folder.
    {% endfor %}
    {% else %} {# Top-level cards: folders as cards, ungrouped files below. #} {% if folder_groups %} {% endif %} {% if ungrouped_items %} {% if folder_groups %}

    Unfiled

    {% endif %}
    {% endif %} {% endif %} {% endif %}
    {% if truncated %}

    Showing up to the first {{ limit }} files. Register fewer or smaller folders to narrow the list.

    {% endif %} {% else %} {% if trashed %}

    Trash is empty.

    {% elif archived %}

    No archived runs. Archive a run from the active library to see it here.

    {% else %}

    No media yet. Add a recording with the button above, or register a folder on the server.

    {% endif %} {% endif %} {% if trashed and rows %}

    Emptying the trash permanently deletes the files from disk. This cannot be undone.

    {% endif %} {% endblock %}