forked from rho_n/hpr_generator
Merge pull request 'Refactor RSS templates for either MySQL or SQLite' (#74) from I73-Fix_queries_for-RSS_feeds into main
Reviewed-on: rho_n/hpr_generator#74
This commit is contained in:
commit
ec7a6ce379
@ -1,5 +1,5 @@
|
|||||||
<!--% PROCESS 'shared-item.tpl.xml' %-->
|
<!--% PROCESS 'shared-item.tpl.xml' %-->
|
||||||
<!--% PROCESS 'rss-query-hpr.tpl.xml' %-->
|
<!--% PROCESS "rss-query-hpr-${constants.database}.tpl.xml" %-->
|
||||||
<!--% FOREACH episode IN feed_result %-->
|
<!--% FOREACH episode IN feed_result %-->
|
||||||
<!--% display_item(episode, media_file_extension, audio_mime_type) %-->
|
<!--% display_item(episode, media_file_extension, audio_mime_type) %-->
|
||||||
<!--% END %-->
|
<!--% END %-->
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--% PROCESS 'shared-item.tpl.xml' %-->
|
<!--% PROCESS 'shared-item.tpl.xml' %-->
|
||||||
<!--% PROCESS 'rss-query-hpr_total.tpl.xml' %-->
|
<!--% PROCESS "rss-query-hpr_total-${constants.database}.tpl.xml" %-->
|
||||||
<!--% FOREACH episode IN feed_result %-->
|
<!--% FOREACH episode IN feed_result %-->
|
||||||
<!--% display_item(episode, media_file_extension, audio_mime_type) %-->
|
<!--% display_item(episode, media_file_extension, audio_mime_type) %-->
|
||||||
<!--% END %-->
|
<!--% END %-->
|
||||||
|
23
templates/rss-query-hpr-sqlite.tpl.xml
Normal file
23
templates/rss-query-hpr-sqlite.tpl.xml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<!--% 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
|
||||||
|
LIMIT 10
|
||||||
|
')
|
||||||
|
%-->
|
||||||
|
<!--% feed_result = query_hpr_feed.execute() %-->
|
||||||
|
|
22
templates/rss-query-hpr_total-sqlite.tpl.xml
Normal file
22
templates/rss-query-hpr_total-sqlite.tpl.xml
Normal 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() %-->
|
||||||
|
|
Loading…
Reference in New Issue
Block a user