Add MACRO display_episode_duration

Format duration as hh:mm:ss
This commit is contained in:
Roan Horning 2022-08-29 21:54:42 -04:00
parent 082ea4069d
commit 414bae101a
Signed by untrusted user: rho_n
GPG Key ID: 234AEF20B72D5769

View File

@ -8,6 +8,20 @@
<!--% ELSE %--><!--% display_when_false %--><!--% END %-->
<!--% END %-->
<!--% MACRO display_episode_duration(duration_sec) BLOCK %-->
<!--% seconds = duration_sec % 60 %-->
<!--% USE format %-->
<!--% minutes_only = format("%d") %-->
<!--% minutes = minutes_only(duration_sec / 60) %-->
<!--% hours_only = format("%d") %-->
<!--% hours = hours_only(minutes / 60) %-->
<!--% IF hours >= 1 %-->
<!--% minutes = minutes - hours * 60 %-->
<!--% END %-->
<!--% display_hours = format("%02d:%02d:%02d") %-->
<!--% display_hours(hours,minutes,seconds) %-->
<!--% END %-->
<!--% MACRO display_explicit(is_explicit) BLOCK %-->
<!--% display_choice(is_explicit, 'Explicit', 'Clean') %-->
<!--% END %-->