diff --git a/templates/podcast.html.twig b/templates/podcast.html.twig index 55fc854..a0b147b 100644 --- a/templates/podcast.html.twig +++ b/templates/podcast.html.twig @@ -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 %} {{node.title.0.value}} ({{num+1}}/{{num_audios}}: {{audio.field_audio_link[0].title}}) @@ -44,7 +45,7 @@ {{ "@#{node.created.0.value}" | date("r") }} Redazione Ondarossa - 00:{{"%02d" | format(duratamin)}}:{{"%02d" | format(duratasec)}} + {{"%02d" | format(duratahrs)}}:{{"%02d" | format(duratamin)}}:{{"%02d" | format(duratasec)}} no {{ audiourl }}