FIX podcast duration (hours)
This commit is contained in:
parent
91303a0b17
commit
a8073b3537
1 changed files with 3 additions and 2 deletions
|
@ -24,7 +24,8 @@
|
|||
{% set audiourl = audio.field_audio_link[0].uri %}
|
||||
{% set ext = audiourl|split('.')|last %}
|
||||
{% set durata = audio.field_durata[0].value %}
|
||||
{% set duratamin = durata // 60 %}
|
||||
{% set duratahrs = durata // 3600 %}
|
||||
{% set duratamin = (durata // 60) % 60 %}
|
||||
{% set duratasec = durata % 60 %}
|
||||
{% if num_audios > 1 %}
|
||||
<title> {{node.title.0.value}} ({{num+1}}/{{num_audios}}: {{audio.field_audio_link[0].title}}) </title>
|
||||
|
@ -44,7 +45,7 @@
|
|||
<enclosure url="{{ audiourl | replace({"https://": "http://"}) | escape('html_attr') }}" type="audio/{{ext}}" length="1024"></enclosure>
|
||||
<pubDate>{{ "@#{node.created.0.value}" | date("r") }}</pubDate>
|
||||
<itunes:author>Redazione Ondarossa</itunes:author>
|
||||
<itunes:duration>00:{{"%02d" | format(duratamin)}}:{{"%02d" | format(duratasec)}}</itunes:duration>
|
||||
<itunes:duration>{{"%02d" | format(duratahrs)}}:{{"%02d" | format(duratamin)}}:{{"%02d" | format(duratasec)}}</itunes:duration>
|
||||
<itunes:explicit>no</itunes:explicit>
|
||||
<guid>{{ audiourl }}</guid>
|
||||
</item>
|
||||
|
|
Loading…
Reference in a new issue