-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNoSüG-Archiv
61 lines (45 loc) · 3.73 KB
/
NoSüG-Archiv
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<p>{{ podcast.summary }}</p>
{% set total = 0 %}
{% for episode in podcast.episodes %}
{% set total = total + episode.duration.totalMilliseconds %}
{% endfor %}
{% set Durchschnittslänge = total / podcast.episodes|length %}
{% 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 %}
{% set durchschnitthours = Durchschnittslänge // (1000 * 3600) %}
{% set durchschnittminutes = (Durchschnittslänge // (1000 * 60)) % 60 %}
{% set durchschnittseconds = (Durchschnittslänge // 1000) % 60 %}
{% if durchschnitthours < 10 %}
{% set durchschnitthours = "0" ~ durchschnitthours %}
{% endif %}
{% if durchschnittminutes < 10 %}
{% set durchschnittminutes = "0" ~ durchschnittminutes %}
{% endif %}
{% if durchschnittseconds < 10 %}
{% set durchschnittseconds = "0" ~ durchschnittseconds %}
{% endif %}
{% set Downloadsumme = 0 %}
{% set Episodenzaehler = podcast.episodes|length %}
{% for episode in podcast.episodes %}
{% set Downloadsumme = Downloadsumme + episode.total_downloads %}
{% endfor %}
{% set Durchschnitt = Downloadsumme / Episodenzaehler %}
<p>{{ podcast.title }} besteht (incl. der Nullnummer und der Zwischenepisode 13b) aus {{ Episodenzaehler }} Episoden. Ihre Gesamtdauer beträgt {{ hours }} Stunden {{ minutes }} Minuten und {{ seconds }} Sekunden. Die durchschnittliche Episode ist {{ durchschnitthours }} Stunden {{ durchschnittminutes }} und {{ durchschnittseconds }} Sekunden lang und wurde im Durchschnitt {{ Durchschnitt|round }} mal heruntergeladen. </p>
<h2>Episodenliste:</h2>
{% for episode in podcast.episodes({post_status: 'future'}) %}
<p style="color: #a59f9f;margin-top:20px">Die nächste Episode <b>"{{ episode.post.post_title }}"</b> erscheint am {{ episode.publicationDate.format('j. F Y') }} um {{ episode.publicationDate.format('H:i') }} Uhr{% if episode.chapters|length > 0 %} und hat {{ episode.chapters|length }} Kapitelmarken, Themen unter anderem: {% for chapter in episode.chapters|slice(4,8) %} "{{ chapter.title }}"{% if not loop.last %}, {% endif %}{% endfor %}{% endif %}. {% if episode.duration.totalMilliseconds > 0 %} Du kannst Dich auf {{ episode.duration }} feinste Unterhaltung freuen. {% endif %}</p>
{% endfor %}
{% for episode in podcast.episodes %}
<p style="margin-top:20px;border-bottom:1px grey solid"><span style="font-weight:bold"><a href="{{ episode.url }}">{{ episode.post.post_title }}</a></span><br /><span style="font-decoration:italic">{{ episode.subtitle }}</span> Dazu gab es bisher <a href="{{ episode.url }}#comments">{{ episode.post.comment_count }} {% if episode.post.comment_count == 1 %}Kommentar{% else %}Kommentare{% endif %}</a>.<br /><small><span class="podlove-duration" style="margin-right:75px"><img src="http://icons.joernschaar.de/dauer.png" alt="Die Dauer der Episode" title="Die Dauer der Episode" width="20px"> {{ episode.duration }}</span><span class="podlove-duration" style="margin-right:75px"><img src="http://icons.joernschaar.de/kalender.png" alt="Diese Episode erschien am" title="Diese Episode erschient am" width="20px"> {{ episode.publicationdate.format('d.m.Y') }}</span><span class="podlove-duration"><img src="http://icons.joernschaar.de/downloads.png" alt="Downloads seit Veröffentlichung" title="Downloads seit Veröffentlichung" width="20px"> {{ episode.total_downloads | number_format(0, ',', '.') }} Downloads</span></small></p>
{# ATTENTION! Starting with Podlove Publisher 3.0 you can access the post title with episode.post_title and you should use that instead #}
{% endfor %}