{% extends "base.html" %} {% block title %}批量作词 #{{ batch.id }}{% endblock %} {% block content %} {% if batch.auto_compose %}
① 作词
② 作曲+导出
{% if batch.auto_publish %}
③ 发行
{% endif %}
{% endif %}
{{ batch.status }} {% if batch.status in ('pending', 'running') %}
{% endif %}
{{ batch.account_name or '-' }}
{{ batch.completed_count }} / {{ batch.total_count }} {% if batch.failed_count %} ({{ batch.failed_count }}失败) {% endif %}
{% if batch.auto_compose %}
{{ batch.composed_count or 0 }} 首
{{ batch.exported_count or 0 }} 首 (每首可生成多个音频)
{% endif %} {% if batch.auto_publish %}
{{ batch.published_count or 0 }} 首
{% endif %}
{% if batch.status == 'running' or batch.status == 'pending' %}
{% endif %}
{% if batch.template_file.startswith('category:') %}{{ batch.template_file[9:] }}(随机){% else %}{{ batch.template_file.split('/')[-1].split('\\')[-1] }}{% endif %}
{{ batch.language or '中文' }}
{{ batch.model }}
{% if batch.hashtag %}
#{{ batch.hashtag }}
{% endif %}
{% if batch.auto_compose %}
{{ batch.compose_model }}
{% if batch.auto_publish %}
{{ '独家授权' if batch.auth_type == 'exclusive' else '独家代理授权' }}
{% endif %}
{% endif %} {% if batch.error_message %}

{{ batch.error_message }}

{% endif %}
{{ batch.created_at[:19] }}
{% if batch.finished_at %}
{{ batch.finished_at[:19] }}
{% endif %}
{% if generations %}

生成结果

{% if batch.auto_compose %}{% endif %} {% for g in generations %} {% if batch.auto_compose %} {% endif %} {% endfor %}
# 标题 作词作曲导出备注 操作
{{ loop.index }} {{ g.title or '-' }} {% if g.status == 'completed' %} completed {% elif g.status == 'failed' %} failed {% else %} {{ g.status }} {% endif %} {% if g.status != 'completed' %} - {% elif g.compose_display == 'completed' %} completed {% elif g.compose_display == 'timeout' %} timeout {% elif g.compose_display == 'failed' %} failed {% elif g.compose_display == 'skipped' %} skipped {% elif not g.compose_display %} 待处理 {% endif %} {% if g.status != 'completed' or g.compose_display not in ('completed',) %} - {% elif g.export_status == 'completed' %} completed {% elif g.export_status == 'failed' %} failed {% elif not g.export_status %} 待处理 {% endif %} {% if g.status == 'failed' and g.error_message %} {{ (g.error_message or '')[:60] }}{% if (g.error_message or '')|length > 60 %}...{% endif %} {% elif g.compose_note %} {{ g.compose_note }} {% elif g.compose_display == 'failed' %} 作曲失败 {% elif g.compose_display == 'timeout' %} 作曲超时(服务器可能仍在处理) {% elif g.export_status == 'failed' %} 导出失败 {% endif %} {% if g.status == 'completed' %} 查看 {% endif %}
{% if batch.status in ('completed', 'failed') and batch.auto_compose %}
{% set has_compose_failed = generations | selectattr('compose_display', 'equalto', 'failed') | list | length > 0 %} {% set has_compose_timeout = generations | selectattr('compose_display', 'equalto', 'timeout') | list | length > 0 %} {% set has_compose_pending = generations | selectattr('compose_display', 'equalto', '') | selectattr('status', 'equalto', 'completed') | list | length > 0 %} {% set has_export_failed = generations | selectattr('export_status', 'equalto', 'failed') | list | length > 0 %} {% set has_lyrics_failed = generations | selectattr('status', 'equalto', 'failed') | list | length > 0 %} {% set has_lyrics_pending = generations | selectattr('status', 'equalto', 'pending') | list | length > 0 %} {% if has_lyrics_failed or has_lyrics_pending %}
{% endif %} {% if has_compose_failed or has_compose_pending or has_compose_timeout %}
{% endif %} {% if has_export_failed %}
{% endif %} {% if batch.auto_publish and (batch.exported_count or 0) > (batch.published_count or 0) %}
{% endif %}
{% endif %} {% endif %} {% endblock %} {% block scripts %} {% endblock %}