Revert "chore: 11ty img"

This reverts commit 73eb06739e.
This commit is contained in:
Cory Dransfeldt 2024-06-06 15:33:48 -07:00
parent 73eb06739e
commit 2c18ab1030
No known key found for this signature in database
23 changed files with 270 additions and 728 deletions

View file

@ -10,7 +10,7 @@ export default async function () {
"locale": "en_US",
"lang": "en",
"meta_data": {
"opengraph_default": "/assets/img/avatar.png"
"opengraph_default": "https://coryd.dev/.netlify/images/?url=/assets/img/avatar.png&w=500&h=500&fm=webp"
}
}
}

View file

@ -40,8 +40,6 @@ const fetchAllMovies = async () => {
rangeStart += PAGE_SIZE
}
movies = movies.filter(movie => movie.last_watched)
return movies
}
@ -68,7 +66,6 @@ export default async function () {
}
return movie
}).filter(movie => watched ? movie['lastWatched'] : !movie['lastWatched'])
const favoriteMovies = movies.filter(movie => movie['favorite'])
const collectedMovies = movies.filter(movie => movie['collected'])
const recentlyWatchedMovies = movies.filter(movie => movie['last_watched']).sort((a, b) => new Date(b['last_watched']) - new Date(a['last_watched']))

View file

@ -40,10 +40,6 @@ const fetchAllShows = async () => {
rangeStart += PAGE_SIZE
}
shows = shows.filter(show =>
show.episodes.some(episode => episode.last_watched_at)
)
return shows
}
@ -100,8 +96,8 @@ export default async function () {
season: seasonNumber,
tmdbId: showTmdbId,
type: 'tv',
image: `https://coryd.dev/media/shows/poster-${showTmdbId}.jpg`,
backdrop: `https://coryd.dev/media/shows/backdrops/backdrop-${showTmdbId}.jpg`,
image: `/media/shows/poster-${showTmdbId}.jpg`,
backdrop: `/media/shows/backdrops/backdrop-${showTmdbId}.jpg`,
dateAdded: lastWatchedAt,
lastWatchedAt
})
@ -128,8 +124,8 @@ export default async function () {
collected: show['collected'],
favorite: show['favorite'],
type: 'tv-range',
image: `https://coryd.dev/media/shows/poster-${show['tmdbId']}.jpg`,
backdrop: `https://coryd.dev/media/shows/backdrops/backdrop-${show['tmdbId']}.jpg`,
image: `/media/shows/poster-${show['tmdbId']}.jpg`,
backdrop: `/media/shows/backdrops/backdrop-${show['tmdbId']}.jpg`,
})
} else {
const singleEpisode = show['episodes'][0]
@ -143,6 +139,8 @@ export default async function () {
}
const favoriteShows = shows.filter(show => show['favorite'])
const collectedShows = shows.filter(show => show['collected'])
const toWatch = shows.map(show => ({...show, url: `/watching/shows/${show['tmdb_id']}`})).filter(show => !show.episodes.some(episode => episode.last_watched_at)).sort((a, b) => a['title'].localeCompare(b['title']))
return {
shows,