Limit correspondent page episode count to released episodes

Fix for rho_n/hpr_generator#188
This commit is contained in:
Roan Horning 2024-09-08 12:00:23 -04:00
parent 92dce90753
commit c64ad492c8
Signed by: rho_n
GPG Key ID: 234AEF20B72D5769
3 changed files with 14 additions and 7 deletions

View File

@ -3,15 +3,10 @@
<!--% PROCESS 'shared-utils.tpl.html' %--> <!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS "queries-correspondent-${constants.database}.tpl.html" %--> <!--% PROCESS "queries-correspondent-${constants.database}.tpl.html" %-->
<!--% USE DBI(constants.driver, constants.user, constants.password) %--> <!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<!--% query_hpr_show_count = DBI.prepare('
SELECT id
FROM eps
WHERE eps.hostid = ?
')
%-->
<!--% results_hpr_shows = DBI.prepare(query_hpr_shows) <!--% results_hpr_shows = DBI.prepare(query_hpr_shows)
%--> %-->
<!--% hpr_shows_to_count = query_hpr_show_count.execute(id); %--> <!--% results_hpr_show_count = DBI.prepare(query_hpr_show_count) %-->
<!--% hpr_shows_to_count = results_hpr_show_count.execute(id); %-->
<!--% hpr_shows = results_hpr_shows.execute(id); %--> <!--% hpr_shows = results_hpr_shows.execute(id); %-->
<!--% hpr_show_count = 0 %--> <!--% hpr_show_count = 0 %-->
<!--% FOREACH show IN hpr_shows_to_count %--> <!--% FOREACH show IN hpr_shows_to_count %-->

View File

@ -16,3 +16,9 @@
ORDER BY eps.id DESC ORDER BY eps.id DESC
' '
%--> %-->
<!--% query_hpr_show_count = '
SELECT id
FROM eps
WHERE eps.hostid = ? eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
%-->

View File

@ -16,3 +16,9 @@
ORDER BY eps.id + 0 DESC ORDER BY eps.id + 0 DESC
' '
%--> %-->
<!--% query_hpr_show_count = '
SELECT id
FROM eps
WHERE eps.hostid = ? AND eps.date < date(\'now\', \'+1 days\')
'
%-->