chore: add review fields piped to markdown + title updates

This commit is contained in:
Cory Dransfeldt 2024-05-22 17:21:04 -07:00
parent 1fb5acd132
commit 8c04f63637
No known key found for this signature in database
5 changed files with 14 additions and 4 deletions

View file

@ -23,7 +23,8 @@ const fetchAllMovies = async () => {
plays, plays,
favorite, favorite,
rating, rating,
description description,
review
`) `)
.order('last_watched', { ascending: false }) .order('last_watched', { ascending: false })
.range(rangeStart, rangeStart + PAGE_SIZE - 1) .range(rangeStart, rangeStart + PAGE_SIZE - 1)

View file

@ -19,6 +19,7 @@ const fetchAllShows = async () => {
favorite, favorite,
year, year,
description, description,
review,
episodes ( episodes (
episode_number, episode_number,
season_number, season_number,

View file

@ -7,7 +7,7 @@
{% elsif book.title %} {% elsif book.title %}
Books • {{ book.title }} • {{ meta.siteName }} Books • {{ book.title }} • {{ meta.siteName }}
{% elsif movie.title %} {% elsif movie.title %}
Movies • {{ movie.title }} • {{ meta.siteName }} Movies • {{ movie.title }}{% if movie.rating %} ({{ movie.rating }}){% endif %} • {{ meta.siteName }}
{% elsif movie.title %} {% elsif movie.title %}
Shows • {{ show.title }} • {{ meta.siteName }} Shows • {{ show.title }} • {{ meta.siteName }}
{% else %} {% else %}
@ -20,9 +20,9 @@
{% elsif book.description %} {% elsif book.description %}
{{ book.description }} {{ book.description }}
{% elsif movie.description %} {% elsif movie.description %}
{{ movie.description }} {% if movie.review %}{{ movie.review }}{% else %}{{ movie.description }}{% endif %}
{% elsif show.description %} {% elsif show.description %}
{{ show.description }} {% if show.review %}{{ show.review }}{% else %}{{ show.description }}{% endif %}
{% elsif description %} {% elsif description %}
{{ description }} {{ description }}
{% else %} {% else %}

View file

@ -19,5 +19,9 @@ schema: movie
{% if movie.lastWatched %}<p class="sub-meta">Last watched on: {{ movie.lastWatched | date: "%B %e, %Y" }}</p>{% endif %} {% if movie.lastWatched %}<p class="sub-meta">Last watched on: {{ movie.lastWatched | date: "%B %e, %Y" }}</p>{% endif %}
<p class="sub-meta"><a href="https://themoviedb.org/movie/{{ movie.id }}">View on TMDB</a></p> <p class="sub-meta"><a href="https://themoviedb.org/movie/{{ movie.id }}">View on TMDB</a></p>
</div> </div>
{% if movie.review %}
<p>{{ movie.review | markdown }}</p>
<hr class="large-spacing" />
{% endif %}
{% if movie.description %}<p><em>{{ movie.description }}</em></p>{% endif %} {% if movie.description %}<p><em>{{ movie.description }}</em></p>{% endif %}
</article> </article>

View file

@ -19,5 +19,9 @@ schema: show
{% if lastWatched %}<p class="sub-meta">Last watched on: {{ lastWatched | date: "%B %e, %Y" }}</p>{% endif %} {% if lastWatched %}<p class="sub-meta">Last watched on: {{ lastWatched | date: "%B %e, %Y" }}</p>{% endif %}
<p class="sub-meta"><a href="https://themoviedb.org/tv/{{ show.tmdb_id }}">View on TMDB</a></p> <p class="sub-meta"><a href="https://themoviedb.org/tv/{{ show.tmdb_id }}">View on TMDB</a></p>
</div> </div>
{% if show.review %}
<p>{{ show.review | markdown }}</p>
<hr class="large-spacing" />
{% endif %}
{% if show.description %}<p><em>{{ show.description }}</em></p>{% endif %} {% if show.description %}<p><em>{{ show.description }}</em></p>{% endif %}
</article> </article>