Hide display of future shows on series episodes page
This commit is contained in:
parent
4a34496f24
commit
8feb37e831
@ -1,20 +1,8 @@
|
|||||||
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
|
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
|
||||||
<!--% PROCESS 'shared-avatar.tpl.html' %-->
|
<!--% PROCESS 'shared-avatar.tpl.html' %-->
|
||||||
|
<!--% PROCESS "queries-series_episodes-${constants.database}.tpl.html" %-->
|
||||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||||
<!--% query_series = DBI.prepare('SELECT miniseries.id, miniseries.name,
|
<!--% query_series = DBI.prepare(query_series_sql)
|
||||||
miniseries.description,
|
|
||||||
miniseries.private, miniseries.image, miniseries.valid,
|
|
||||||
ep.number_of_episodes, ep.latest_show, ep.earliest_show
|
|
||||||
FROM miniseries
|
|
||||||
INNER JOIN
|
|
||||||
(SELECT series,
|
|
||||||
COUNT(eps.id) AS number_of_episodes,
|
|
||||||
MAX(eps.date) AS latest_show,
|
|
||||||
MIN(eps.date) AS earliest_show
|
|
||||||
FROM eps
|
|
||||||
GROUP BY series) AS ep ON ep.series = miniseries.id
|
|
||||||
WHERE miniseries.id = ?
|
|
||||||
ORDER BY name')
|
|
||||||
%-->
|
%-->
|
||||||
<!--% series_result = query_series.execute(id) %-->
|
<!--% series_result = query_series.execute(id) %-->
|
||||||
<article>
|
<article>
|
||||||
@ -29,17 +17,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div><em><!--% series.description %--></em></div>
|
<div><em><!--% series.description %--></em></div>
|
||||||
<!--% END %-->
|
<!--% END %-->
|
||||||
<!--% query_shows = DBI.prepare('SELECT
|
<!--% query_shows = DBI.prepare(query_shows_sql)
|
||||||
id, date, title,
|
|
||||||
duration, summary, notes,
|
|
||||||
explicit, eps.license, tags,
|
|
||||||
hosts.host, hosts.hostid
|
|
||||||
FROM eps
|
|
||||||
INNER JOIN hosts
|
|
||||||
ON eps.hostid = hosts.hostid
|
|
||||||
WHERE series = ?
|
|
||||||
ORDER BY eps.id DESC
|
|
||||||
')
|
|
||||||
%-->
|
%-->
|
||||||
<!--% show_results = query_shows.execute(id) %-->
|
<!--% show_results = query_shows.execute(id) %-->
|
||||||
<!--% FOREACH show IN show_results %-->
|
<!--% FOREACH show IN show_results %-->
|
||||||
|
29
templates/queries-series_episodes-mysql.tpl.html
Normal file
29
templates/queries-series_episodes-mysql.tpl.html
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<!--% query_series_sql = 'SELECT miniseries.id, miniseries.name,
|
||||||
|
miniseries.description,
|
||||||
|
miniseries.private, miniseries.image, miniseries.valid,
|
||||||
|
ep.number_of_episodes, ep.latest_show, ep.earliest_show
|
||||||
|
FROM miniseries
|
||||||
|
INNER JOIN
|
||||||
|
(SELECT series,
|
||||||
|
COUNT(eps.id) AS number_of_episodes,
|
||||||
|
MAX(eps.date) AS latest_show,
|
||||||
|
MIN(eps.date) AS earliest_show
|
||||||
|
FROM eps
|
||||||
|
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||||
|
GROUP BY series) AS ep ON ep.series = miniseries.id
|
||||||
|
WHERE miniseries.id = ?
|
||||||
|
ORDER BY name'
|
||||||
|
%-->
|
||||||
|
<!--% query_shows_sql = 'SELECT
|
||||||
|
id, date, title,
|
||||||
|
duration, summary, notes,
|
||||||
|
explicit, eps.license, tags,
|
||||||
|
hosts.host, hosts.hostid
|
||||||
|
FROM eps
|
||||||
|
INNER JOIN hosts
|
||||||
|
ON eps.hostid = hosts.hostid
|
||||||
|
WHERE series = ? AND eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||||
|
ORDER BY eps.id DESC
|
||||||
|
'
|
||||||
|
%-->
|
||||||
|
|
28
templates/queries-series_episodes-sqlite.tpl.html
Normal file
28
templates/queries-series_episodes-sqlite.tpl.html
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<!--% query_series_sql = 'SELECT miniseries.id, miniseries.name,
|
||||||
|
miniseries.description,
|
||||||
|
miniseries.private, miniseries.image, miniseries.valid,
|
||||||
|
ep.number_of_episodes, ep.latest_show, ep.earliest_show
|
||||||
|
FROM miniseries
|
||||||
|
INNER JOIN
|
||||||
|
(SELECT series,
|
||||||
|
COUNT(eps.id) AS number_of_episodes,
|
||||||
|
MAX(eps.date) AS latest_show,
|
||||||
|
MIN(eps.date) AS earliest_show
|
||||||
|
FROM eps
|
||||||
|
WHERE eps.date < date(\'now\', \'+1 days\')
|
||||||
|
GROUP BY series) AS ep ON ep.series = miniseries.id
|
||||||
|
WHERE miniseries.id = ?
|
||||||
|
ORDER BY name'
|
||||||
|
%-->
|
||||||
|
<!--% query_shows_sql = 'SELECT
|
||||||
|
id, date, title,
|
||||||
|
duration, summary, notes,
|
||||||
|
explicit, eps.license, tags,
|
||||||
|
hosts.host, hosts.hostid
|
||||||
|
FROM eps
|
||||||
|
INNER JOIN hosts
|
||||||
|
ON eps.hostid = hosts.hostid
|
||||||
|
WHERE series = ? AND eps.date < date(\'now\', \'+1 days\')
|
||||||
|
ORDER BY eps.id DESC
|
||||||
|
'
|
||||||
|
%-->
|
Reference in New Issue
Block a user