feat: last watched episode on show page if available

This commit is contained in:
Cory Dransfeldt 2024-08-08 17:53:56 -07:00
parent 2e3753046b
commit a856969fff
No known key found for this signature in database
4 changed files with 15 additions and 5 deletions

View file

@ -34,7 +34,16 @@ schema: show
/>
<div class="watching-meta">
<p class="title"><strong>{{ show.title }}</strong>{%- if show.year %} ({{ show.year }}){%- endif -%}</p>
{%- if lastWatched -%}<p class="sub-meta">Last watched on {{ lastWatched | date: "%B %e, %Y" }}</p>{%- endif -%}
{%- if lastWatched -%}
{%- capture lastWatchedText -%}
{%- if show.episodes -%}
I last watched <strong class="highlight-text">{{ show.episodes | lastEpisode }}</strong> on {{ lastWatched | date: "%B %e, %Y" }}.
{%- else -%}
Last watched on {{ lastWatched | date: "%B %e, %Y" }}.
{%- endif -%}
{%- endcapture -%}
<p class="sub-meta">{{ lastWatchedText }}</p>
{%- endif -%}
<p class="sub-meta"><a href="https://themoviedb.org/tv/{{ show.tmdb_id }}" title="View {{ show.title | escape }} on TMDB">View on TMDB</a></p>
</div>
{% if show.review %}