feat: lightweight media pages

This commit is contained in:
Cory Dransfeldt 2024-05-22 15:45:51 -07:00
parent cd268580fc
commit 1fb5acd132
No known key found for this signature in database
11 changed files with 223 additions and 129 deletions

View file

@ -22,7 +22,8 @@ const fetchAllMovies = async () => {
collected,
plays,
favorite,
rating
rating,
description
`)
.order('last_watched', { ascending: false })
.range(rangeStart, rangeStart + PAGE_SIZE - 1)
@ -49,7 +50,7 @@ export default async function () {
lastWatched: item['last_watched'],
dateAdded: item['last_watched'],
year: item['year'],
url: `https://www.themoviedb.org/movie/${item['tmdb_id']}`,
url: `https://coryd.dev/movies/${item['tmdb_id']}`,
description: `${item['title']} (${item['year']})<br/>Watched at: ${DateTime.fromISO(item['last_watched'], { zone: 'utc' }).setZone('America/Los_Angeles').toFormat('MMMM d, yyyy, h:mma')}`,
image: `https://coryd.dev/media/movies/poster-${item['tmdb_id']}.jpg`,
backdrop: `https://coryd.dev/media/movies/backdrops/backdrop-${item['tmdb_id']}.jpg`,
@ -57,6 +58,8 @@ export default async function () {
collected: item['collected'],
favorite: item['favorite'],
rating: item['rating'],
description: item['description'],
id: item['tmdb_id'],
type: 'movie'
}
return movie