diff --git a/_redirects b/_redirects index a4961cf2..55bb3191 100644 --- a/_redirects +++ b/_redirects @@ -75,7 +75,7 @@ /mastodon https://social.lol/@cory 301 /coffee https://www.buymeacoffee.com/cory 301 /tags /search 301 -/tags/* /search 301 -/music/genre/* /music/genres/:splat 301 /reading /books -/stats /search 301 \ No newline at end of file +/stats /search 301 +/tags/* /search 301 +/music/genre/* /music/genres/:splat 301 \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 937bb18b..254f8b9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "21.1.3", + "version": "21.1.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "21.1.3", + "version": "21.1.4", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.4.0", diff --git a/package.json b/package.json index 5b3756ec..c80f3432 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "21.1.3", + "version": "21.1.4", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "scripts": { diff --git a/src/data/tv.js b/src/data/tv.js index 02197255..f79c6a8c 100644 --- a/src/data/tv.js +++ b/src/data/tv.js @@ -53,6 +53,7 @@ const prepareEpisodeData = (show) => show['episodes'].map(episode => ({ ...episode, show_title: show['title'], show_tmdb_id: show['tmdb_id'], + show_year: show['year'], collected: show['collected'], favorite: show['favorite'], image: show['image'], @@ -66,12 +67,14 @@ const formatEpisodeData = (episodes) => { const showEpisodesMap = {} episodes.forEach(episode => { - const showTmdbId = episode.show_tmdb_id + const showTmdbId = episode['show_tmdb_id'] + const showYear = episode['show_year'] if (!showEpisodesMap[showTmdbId]) { showEpisodesMap[showTmdbId] = { title: episode['show_title'], tmdbId: showTmdbId, + year: showYear, collected: episode['collected'], favorite: episode['favorite'], dateAdded: episode['last_watched_at'], @@ -89,6 +92,7 @@ const formatEpisodeData = (episodes) => { episode: episode['episode_number'], season: episode['season_number'], tmdbId: showTmdbId, + year: showYear, type: 'tv', dateAdded: episode['last_watched_at'], lastWatchedAt: episode['last_watched_at'], @@ -113,6 +117,7 @@ const formatEpisodeData = (episodes) => { episode: endingEpisode, season: endingSeason, tmdbId: show['tmdbId'], + year: show['year'], collected: show['collected'], favorite: show['favorite'], type: 'tv-range', @@ -130,7 +135,6 @@ export default async function () { const rawShows = await fetchAllShows() const shows = rawShows.map(prepareShowData) const episodes = shows.flatMap(prepareEpisodeData).sort((a, b) => new Date(b['last_watched_at']) - new Date(a['last_watched_at'])) - const favoriteShows = shows.filter(show => show.favorite) return { diff --git a/src/includes/partials/media/watching/grid.liquid b/src/includes/partials/media/watching/grid.liquid index 837ba975..673ab399 100644 --- a/src/includes/partials/media/watching/grid.liquid +++ b/src/includes/partials/media/watching/grid.liquid @@ -16,6 +16,7 @@ {% else %}