Add media_path MACRO to shared utilities

Generate the full URL of an audio file.
This commit is contained in:
Roan Horning 2022-10-01 13:23:36 -04:00
parent 64ae9c4f86
commit fb70ae6253
Signed by: rho_n
GPG Key ID: 234AEF20B72D5769

View File

@ -49,6 +49,21 @@
<!--% media_baseurl %--><!--% ELSE %--> <!--% media_baseurl %--><!--% ELSE %-->
<!--% IF baseurl %--><!--% baseurl %--><!--% ELSE %-->/<!--% END %--> <!--% IF baseurl %--><!--% baseurl %--><!--% ELSE %-->/<!--% END %-->
<!--% END %--> <!--% END %-->
<!--% END %-->
<!--% MACRO media_path(episode_id, episode_type, media_type, baseurl, media_baseurl) BLOCK %-->
<!--% IF episode_type == "twat" %-->
<!--% padding = 3 %-->
<!--% media_folder = "eps/"; padding = 3 %-->
<!--% ELSE %-->
<!--% media_folder = "local/" %-->
<!--% END %-->
<!--% IF media_baseurl %-->
<!--% media_folder = "" %-->
<!--% media_baseurl = media_baseurl.replace('\$eps_id', zero_pad_left(episode_id)) %-->
<!--% END %-->
<!--% media_basepath(baseurl, media_baseurl) %--><!--% media_folder %--><!--% episode_type %--><!--% zero_pad_left(episode_id, padding) %-->.<!--% media_type %-->
<!--% END %-->
<!--% MACRO step_navigation(baseurl, links, folder) BLOCK %--> <!--% MACRO step_navigation(baseurl, links, folder) BLOCK %-->
<!--% IF folder %--> <!--% IF folder %-->