Archived
4
2

Compare commits

..

No commits in common. "3054d6519e97e0173753e63c0cd5aab4cc16b322" and "0edf9cc5a2cca63daaa0b0106e84b3633b76664a" have entirely different histories.

7 changed files with 34 additions and 38 deletions

View File

@ -125,8 +125,6 @@ sub main {
# from the generated list of pages. # from the generated list of pages.
@page_args= grep { $_ ne 'DBI' } @page_args; @page_args= grep { $_ ne 'DBI' } @page_args;
@page_args= grep { $_ ne 'root_template' } @page_args; @page_args= grep { $_ ne 'root_template' } @page_args;
@page_args= grep { $_ ne 'media_hostname' } @page_args;
}; };
foreach my $page_arg (@page_args) { foreach my $page_arg (@page_args) {
my %parsed_arg = parse_page_arg($page_arg); my %parsed_arg = parse_page_arg($page_arg);
@ -144,10 +142,6 @@ sub main {
$page_config->{'baseurl'} = $config{root_template}{baseurl}; $page_config->{'baseurl'} = $config{root_template}{baseurl};
} }
if (exists $config{root_template}{media_hostname}) {
$page_config->{'media_hostname'} = $config{root_template}{media_hostname};
}
if ($page_config->{'multipage'} && $page_config->{'multipage'} eq 'true') { if ($page_config->{'multipage'} && $page_config->{'multipage'} eq 'true') {
if (scalar @{$parsed_arg{'ids'}} == 1) { if (scalar @{$parsed_arg{'ids'}} == 1) {
@{$parsed_arg{'ids'}} = get_ids_from_db($tt, \$page_config); @{$parsed_arg{'ids'}} = get_ids_from_db($tt, \$page_config);

View File

@ -1,7 +1,6 @@
<!--% PROCESS 'shared-episode-summary.tpl.html' %--> <!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% PROCESS 'shared-avatar.tpl.html' %--> <!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %--> <!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-listen-now.tpl.html' %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %--> <!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_episodes = DBI.prepare(' <!--% query_episodes = DBI.prepare('
WITH episode_maxmin AS ( WITH episode_maxmin AS (
@ -75,7 +74,17 @@ Hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pa
</header> </header>
<div><!--% episode.notes %--></div> <div><!--% episode.notes %--></div>
<footer> <footer>
<!--% listen_now(episode, "hpr", baseurl, media_hostname) %--> <h2>Listen Now</h2>
<p>Duration: <!--% display_episode_duration(episode.duration) %--></p>
<audio controls preload="none">
<source src="<!--% absolute_path(baseurl) %-->local/hpr<!--% episode.id %-->.ogg" type="audio/ogg" >
<source src="<!--% absolute_path(baseurl) %-->local/hpr<!--% episode.id %-->.mp3" type="audio/mpeg" >
</audio>
<ul>
<li>ogg: <a href="<!--% absolute_path(baseurl) %-->local/hpr<!--% episode.id %-->.ogg">https://www.hackerpublicradio.org/local/hpr<!--% episode.id %-->.ogg</a></li>
<li>spx: <a href="<!--% absolute_path(baseurl) %-->local/hpr<!--% episode.id %-->.spx">https://www.hackerpublicradio.org/local/hpr<!--% episode.id %-->.spx</a></li>
<li>mp3: <a href="<!--% absolute_path(baseurl) %-->local/hpr<!--% episode.id %-->.mp3">https://www.hackerpublicradio.org/local/hpr<!--% episode.id %-->.mp3</a></li>
</ul>
<p> <p>
<!--% episode_navigation %--> <!--% episode_navigation %-->
</p> </p>

View File

@ -1,6 +1,5 @@
<!--% PROCESS 'shared-avatar.tpl.html' %--> <!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %--> <!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-listen-now.tpl.html' %-->
<hr> <hr>
<article> <article>
<header> <header>
@ -84,7 +83,17 @@
</header> </header>
<!--% latest_episodes.notes %--> <!--% latest_episodes.notes %-->
<footer> <footer>
<!--% listen_now(latest_episodes, "hpr", baseurl, media_hostname) %--> <h2>listen now</h2>
<p>Duration: <!--% display_episode_duration(latest_episodes.duration) %--></p>
<audio controls preload="none">
<source src="local/hpr<!--% latest_episodes.id %-->.ogg" type="audio/ogg" >
<source src="local/hpr<!--% latest_episodes.id %-->.mp3" type="audio/mpeg" >
</audio>
<ul>
<li>ogg: <a href="local/hpr<!--% latest_episodes.id %-->.ogg">/local/hpr<!--% latest_episodes.id %-->.ogg</a></li>
<li>spx: <a href="local/hpr<!--% latest_episodes.id %-->.spx">/local/hpr<!--% latest_episodes.id %-->.spx</a></li>
<li>mp3: <a href="local/hpr<!--% latest_episodes.id %-->.mp3">/local/hpr<!--% latest_episodes.id %-->.mp3</a></li>
</ul>
</footer> </footer>
</article> </article>
<!--% END %--> <!--% END %-->

View File

@ -1,7 +1,6 @@
<!--% PROCESS 'shared-episode-summary.tpl.html' %--> <!--% PROCESS 'shared-episode-summary.tpl.html' %-->
<!--% PROCESS 'shared-avatar.tpl.html' %--> <!--% PROCESS 'shared-avatar.tpl.html' %-->
<!--% PROCESS 'shared-utils.tpl.html' %--> <!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'shared-listen-now.tpl.html' %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %--> <!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_episodes = DBI.prepare(' <!--% query_episodes = DBI.prepare('
WITH episode_maxmin AS ( WITH episode_maxmin AS (
@ -65,7 +64,17 @@ Hosted by <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pa
</header> </header>
<div><!--% episode.notes %--></div> <div><!--% episode.notes %--></div>
<footer> <footer>
<!--% listen_now(episode, "twat", baseurl, media_hostname) %--> <h2>Listen Now</h2>
<p>Duration: <!--% display_episode_duration(episode.duration) %--></p>
<audio controls preload="none">
<source src="<!--% absolute_path(baseurl) %-->local/twat<!--% episode.id %-->.ogg" type="audio/ogg" >
<source src="<!--% absolute_path(baseurl) %-->local/twat<!--% episode.id %-->.mp3" type="audio/mpeg" >
</audio>
<ul>
<li>ogg: <a href="<!--% absolute_path(baseurl) %-->local/twat<!--% episode.id %-->.ogg">https://www.hackerpublicradio.org/local/hpr<!--% episode.id %-->.ogg</a></li>
<li>spx: <a href="<!--% absolute_path(baseurl) %-->local/twat<!--% episode.id %-->.spx">https://www.hackerpublicradio.org/local/hpr<!--% episode.id %-->.spx</a></li>
<li>mp3: <a href="<!--% absolute_path(baseurl) %-->local/twat<!--% episode.id %-->.mp3">https://www.hackerpublicradio.org/local/hpr<!--% episode.id %-->.mp3</a></li>
</ul>
<p> <p>
<!--% episode_navigation %--> <!--% episode_navigation %-->
</p> </p>

View File

@ -12,7 +12,7 @@
<!--% END %--> <!--% END %-->
<!--% MACRO display_listen_in(eps_id) BLOCK %--> <!--% MACRO display_listen_in(eps_id) BLOCK %-->
Listen in <a href="<!--% media_baseurl(baseurl, media_hostname) %-->local/hpr<!--% eps_id %-->.ogg">ogg</a>, <a href="<!--% media_baseurl(baseurl, media_hostname) %-->local/hpr<!--% eps_id %-->.spx">spx</a>, or <a href="<!--% media_baseurl(baseurl, media_hostname) %-->local/hpr<!--% eps_id %-->.mp3">mp3</a> format. Listen in <a href="<!--% absolute_path(baseurl) %-->local/hpr<!--% eps_id %-->.ogg">ogg</a>, <a href="<!--% absolute_path(baseurl) %-->local/hpr<!--% eps_id %-->.spx">spx</a>, or <a href="<!--% absolute_path(baseurl) %-->local/hpr<!--% eps_id %-->.mp3">mp3</a> format.
<!--% END %--> <!--% END %-->
<!--% MACRO display_comments_tally(eps_id, tally) BLOCK %--> <!--% MACRO display_comments_tally(eps_id, tally) BLOCK %-->

View File

@ -1,19 +0,0 @@
<!--% MACRO listen_now(episode, episode_type, baseurl, media_hostname) BLOCK %-->
<!--% IF episode_type == "twat" %-->
<!--% media_folder = "eps" %--><!--% ELSE %--><!--% media_folder = "local" %-->
<!--% END %-->
<h2>Listen Now</h2>
<p>Duration: <!--% display_episode_duration(episode.duration) %--></p>
<audio controls preload="none">
<source src="<!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.ogg" type="audio/ogg" >
<source src="<!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.mp3" type="audio/mpeg" >
</audio>
<ul>
<!--% IF episode_type != "twat" %-->
<li>ogg: <a href="<!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.ogg"><!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.ogg</a></li>
<li>spx: <a href="<!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.spx"><!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.spx</a></li>
<!--% END %-->
<li>mp3: <a href="<!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.mp3"><!--% media_baseurl(baseurl, media_hostname) %--><!--% media_folder %-->/<!--% episode_type %--><!--% episode.id %-->.mp3</a></li>
</ul>
<!--% END %-->

View File

@ -39,12 +39,6 @@
<!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %--> <!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %-->
<!--% END %--> <!--% END %-->
<!--% MACRO media_baseurl(baseurl, media_hostname) BLOCK %-->
<!--% IF media_hostname %-->
https://<!--% media_hostname %-->/<!--% ELSE %-->
<!--% baseurl %--><!--% END %-->
<!--% END %-->
<!--% MACRO step_navigation(baseurl, links, folder) BLOCK %--> <!--% MACRO step_navigation(baseurl, links, folder) BLOCK %-->
<!--% IF folder == "" %--> <!--% IF folder == "" %-->
<!--% folder = hpr %--> <!--% folder = hpr %-->