-
Notifications
You must be signed in to change notification settings - Fork 0
/
Kurzfolgen
35 lines (22 loc) · 873 Bytes
/
Kurzfolgen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{% set total = 0 %}
{% for episode in podcast.episodes({category: 'Kurzfolge'}) %}
{% set total = total + episode.duration.totalMilliseconds %}
{% endfor %}
{# // is division and then rounding down (floor) #}
{% set hours = total // (1000 * 3600) %}
{% set minutes = (total // (1000 * 60)) % 60 %}
{% set seconds = (total // 1000) % 60 %}
{% if hours < 10 %}
{% set hours = "0" ~ hours %}
{% endif %}
{% if minutes < 10 %}
{% set minutes = "0" ~ minutes %}
{% endif %}
{% if seconds < 10 %}
{% set seconds = "0" ~ seconds %}
{% endif %}
<strong>Gesamtdauer aller {{ podcast.episodes({category: 'Kurzfolge'})|length }} kurzen Episoden: {{ hours }} Stunden {{ minutes }} Minuten {{ seconds }} Sekunden</strong>
<p></p>
{% for episode in podcast.episodes({category: 'Kurzfolge'}) %}
{{ include ("Archivvorlage") }}
{% endfor %}