{% for volume, chapters in chapters_by_volume %} {% set is_first = loop.first %} {% set volume_cbz_path = chapters|first.cbzPath %} {% set all_chapters_same_cbz = chapters|reduce((carry, chapter) => carry and chapter.cbzPath == volume_cbz_path, true) %} {% set available_chapters = chapters|filter(chapter => chapter.cbzPath is not null) %} {% set total_chapters = chapters|length %}

Volume {{ '%02d'|format(volume) }}

{{ available_chapters|length }} / {{ total_chapters }}
{% if all_chapters_same_cbz and volume_cbz_path is not null %} {% else %} {% for chapter in chapters %} {% if chapter.cbzPath is not null %} {% else %} {% endif %} {% endfor %} {% endif %}
# Title Actions
{{ '%02d'|format(volume) }} Volume {{ '%02d'|format(volume) }}
{{ '%02d'|format(chapter.number) }} {{ '%02d'|format(chapter.number) }} {% if chapter.cbzPath is not null %} {{ chapter.title ?? 'No title' }} {% else %} {{ chapter.title ?? 'No title' }} {% endif %} {% if chapter.cbzPath is null %} {% else %} {% endif %}
{% endfor %}