Archived
4
2

Compare commits

...

2 Commits

Author SHA1 Message Date
cf001df9ec
Add feed hpr_total
This includes all three audio type feeds
2022-08-17 22:41:59 -04:00
6d4f5f28c9
Refactor main feed to need fewer templates
Add configuration properties to minimize the number of templates
needed to generate the different audio format feeds.
2022-08-17 22:32:32 -04:00
6 changed files with 54 additions and 14 deletions

View File

@ -134,15 +134,38 @@ content: content-sitemap.tpl.html
[hpr_ogg] [hpr_ogg]
root_template: rss.tpl.xml root_template: rss.tpl.xml
content: rss-hpr_ogg.tpl.xml content: rss-hpr.tpl.xml
filename: hpr_ogg.rss filename: hpr_ogg.rss
media_file_extension: ogg
[hpr_mp3] [hpr_mp3]
root_template: rss.tpl.xml root_template: rss.tpl.xml
content: rss-hpr_mp3.tpl.xml content: rss-hpr.tpl.xml
filename: hpr_mp3.rss filename: hpr_mp3.rss
media_file_extension: mp3
audio_mime_type: mpeg
[hpr_spx] [hpr_spx]
root_template: rss.tpl.xml root_template: rss.tpl.xml
content: rss-hpr_spx.tpl.xml content: rss-hpr.tpl.xml
filename: hpr_spx.rss filename: hpr_spx.rss
media_file_extension: spx
[hpr_total_ogg]
root_template: rss.tpl.xml
content: rss-hpr_total.tpl.xml
filename: hpr_total_ogg.rss
media_file_extension: ogg
[hpr_total_mp3]
root_template: rss.tpl.xml
content: rss-hpr_total.tpl.xml
filename: hpr_total_mp3.rss
media_file_extension: mp3
audio_mime_type: mpeg
[hpr_total_spx]
root_template: rss.tpl.xml
content: rss-hpr_total.tpl.xml
filename: hpr_total_spx.rss
media_file_extension: spx

View File

@ -1,5 +1,5 @@
<!--% PROCESS 'shared-item.tpl.xml' %--> <!--% PROCESS 'shared-item.tpl.xml' %-->
<!--% PROCESS 'rss-query-hpr.tpl.xml' %--> <!--% PROCESS 'rss-query-hpr.tpl.xml' %-->
<!--% FOREACH episode IN feed_result %--> <!--% FOREACH episode IN feed_result %-->
<!--% display_item(episode, 'mp3', 'mpeg') %--> <!--% display_item(episode, media_file_extension, audio_mime_type) %-->
<!--% END %--> <!--% END %-->

View File

@ -1,5 +0,0 @@
<!--% PROCESS 'shared-item.tpl.xml' %-->
<!--% PROCESS 'rss-query-hpr.tpl.xml' %-->
<!--% FOREACH episode IN feed_result %-->
<!--% display_item(episode, 'ogg') %-->
<!--% END %-->

View File

@ -1,5 +0,0 @@
<!--% PROCESS 'shared-item.tpl.xml' %-->
<!--% PROCESS 'rss-query-hpr.tpl.xml' %-->
<!--% FOREACH episode IN feed_result %-->
<!--% display_item(episode, 'spx') %-->
<!--% END %-->

View File

@ -0,0 +1,5 @@
<!--% PROCESS 'shared-item.tpl.xml' %-->
<!--% PROCESS 'rss-query-hpr_total.tpl.xml' %-->
<!--% FOREACH episode IN feed_result %-->
<!--% display_item(episode, media_file_extension, audio_mime_type) %-->
<!--% END %-->

View File

@ -0,0 +1,22 @@
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_hpr_feed = DBI.prepare('
SELECT
eps.id,
eps.explicit,
strftime(\'%H:%M:%S %d:%m:%Y\', date(eps.date)) AS date,
eps.license, eps.duration,
eps.title, eps.summary, eps.tags,
eps.notes,
hosts.local_image,
hosts.hostid,
hosts.host, hosts.email,
miniseries.name AS series, miniseries.id AS seriesid
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE eps.date < date(\'now\', \'+1 days\')
ORDER BY eps.date DESC
')
%-->
<!--% feed_result = query_hpr_feed.execute() %-->