6 Commits

Author SHA1 Message Date
ae5bfc12b4 Remove javascript m3u player code
Need community by in before adding javascript to the main site.
2025-11-16 19:45:39 -05:00
21c664ecf9 Add javascript to play m3u file via audio tag
This is an open source (GPL licensed) javascript file which
fetches, parses an M3U formatted file and attaches the files
to the corresponding audio tag within a page.
2025-11-16 19:32:03 -05:00
c17ce1bf74 Add playlist download link to series' pages 2025-11-16 19:25:19 -05:00
c922ea6281 Allow creation of m3u playlist for a series 2025-11-16 19:22:12 -05:00
98c51ee9fe Add playlist download link to correspondents' pages 2025-11-16 15:40:30 -05:00
ae96d602a4 Allow creation of m3u playlist for a host 2025-11-15 12:09:50 -05:00
8 changed files with 68 additions and 2 deletions

View File

@@ -171,3 +171,15 @@ media_file_extension: spx
[comments]
root_template: rss-comments.tpl.xml
filename: comments.rss
[correspondent_m3u]
root_template: m3u.tpl.m3u8
content: m3u-correspondent.tpl.m3u8
filename: correspondents/[id]/playlist.m3u8
multipage: true
[series_episodes_m3u]
root_template: m3u.tpl.m3u8
content: m3u-series_episodes.tpl.m3u8
filename: series/[id].m3u8
multipage: true

View File

@@ -29,7 +29,7 @@
<p><label>email:</label> <u><!--% this_host.email %--></u></p>
<div><label>profile:</label> <!--% this_host.profile %--></div>
<p><label>episodes:</label> <strong><!--% hpr_show_count + twt_show_count %--></strong></p>
</div>
<p><a href="<!--% absolute_url(baseurl,'//correspondents') %-->/<!--% zero_pad_left(this_host.hostid) %-->/playlist.m3u8">Download the M3U playlist</a>.</p>
</div>
<div class="lane stack">
<!--% FOREACH hpr_show IN hpr_shows; %-->

View File

@@ -13,6 +13,7 @@
<li>Date of earliest show: <!--% series.earliest_show %--></li>
<li>Date of latest show: <!--% series.latest_show %--></li>
<li>Series RSS feeds: <a href="<!--% absolute_path(baseurl) %-->hpr_ogg_rss.php?series=<!--% series.id %-->&full=1&gomax=1">ogg</a>, <a href="<!--% absolute_path(baseurl) %-->hpr_spx_rss.php?series=<!--% series.id %-->&full=1&gomax=1">spx</a>, <a href="<!--% absolute_path(baseurl) %-->hpr_mp3_rss.php?series=<!--% series.id %-->&full=1&gomax=1">mp3</a></li>
<li><a href="<!--% absolute_url(baseurl,'//series') %-->/<!--% zero_pad_left(series.id) %-->.m3u8">Download the M3U playlist</a></li>
</ul>
<p><em><!--% series.description %--></em></p>
<section id="series_episodes" class="lane stack">

View File

@@ -0,0 +1,7 @@
<!--% USE DBI(constants.driver) %-->
<!--% FOREACH host IN DBI.query(
'select h.hostid from hosts as h'
) %-->
,<!--% host.hostid %-->
<!--% END %-->

View File

@@ -0,0 +1,7 @@
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% FOREACH series IN DBI.query(
'select s.id from miniseries as s'
) %-->
,<!--% series.id %-->
<!--% END %-->

View File

@@ -0,0 +1,24 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'queries-correspondent.tpl.html' %-->
<!--% USE DBI(constants.driver) %-->
<!--% results_hpr_shows = DBI.prepare(query_hpr_shows) %-->
<!--% hpr_shows = results_hpr_shows.execute(id); %-->
<!--% FOREACH hpr_show IN hpr_shows; %-->
#EXTINF: <!--% hpr_show.duration %-->,<!--% hpr_show.host %--> - <!--% hpr_show.title %-->
<!--% media_path(hpr_show.id, 'hpr', 'mp3', baseurl, media_baseurl) %-->
<!--% END %-->
<!--% results_hpr_shows = DBI.prepare(query_twt_shows) %-->
<!--% twt_result_status = results_twt_show_count.execute(id); %-->
<!--% twt_shows = results_hpr_shows.execute(id); %-->
<!--% FOREACH hpr_show IN twt_shows; %-->
#EXTINF: <!--% hpr_show.duration %-->,<!--% hpr_show.host %--> - <!--% hpr_show.title %-->
<!--% media_path(hpr_show.id, 'twt', 'mp3', baseurl, media_baseurl) %-->
<!--% END %-->

View File

@@ -0,0 +1,13 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS 'queries-series_episodes.tpl.html' %-->
<!--% USE DBI(constants.driver) %-->
<!--% results_hpr_shows = DBI.prepare(query_shows_sql) %-->
<!--% hpr_shows = results_hpr_shows.execute(id); %-->
<!--% FOREACH hpr_show IN hpr_shows; %-->
#EXTINF: <!--% hpr_show.duration %-->,<!--% hpr_show.host %--> - <!--% hpr_show.title %-->
<!--% media_path(hpr_show.id, 'hpr', 'mp3', baseurl, media_baseurl) %-->
<!--% END %-->

2
templates/m3u.tpl.m3u8 Normal file
View File

@@ -0,0 +1,2 @@
#EXTM3U
<!--% INCLUDE $content %-->