Add movies & TV tracker: movies schema, Netflix/Letterboxd/Plex/JSON/recs importers, TMDB matching, stats, owner visibility

This commit is contained in:
stan committed 2026-10-26 00:31:23 +00:00
1 parent 75571bbfe0
commit 71e015d1d0
28 files changed
+42754 -14

No files matched your search

+8 -3
View File
@@ -6,6 +6,7 @@ import { races } from '#lib/derby/races.js';
import { COURSES } from '#lib/language-learner/courses/index.js';
import { gameTrackers } from '#lib/projects.js';
import { and, eq, isNull, ne } from 'drizzle-orm';
import { getVisibility } from '#lib/server/movies/site.js';
import type { RequestHandler } from './$types';
const staticPaths = [
@@ -41,6 +42,7 @@ const staticPaths = [
'/trackers/wildlife',
'/trackers/wildlife/groups',
'/trackers/music',
'/trackers/movies',
'/trackers/pc',
'/trackers/games',
...gameTrackers.map((g) => g.href),
@@ -68,7 +70,7 @@ function escapeXml(value: string): string {
}
export const GET: RequestHandler = async () => {
const [articles, lists, books] = await Promise.all([
const [articles, lists, books, moviesVisibility] = await Promise.all([
db
.select({ slug: blogArticles.slug, updatedAt: blogArticles.updatedAt })
.from(blogArticles)
@@ -78,10 +80,13 @@ export const GET: RequestHandler = async () => {
.select({ id: bookWorks.id, updatedAt: bookWorks.updatedAt })
.from(bookWorks)
// Articles are links to other sites; their pages here are thin.
.where(and(ne(bookWorks.kind, 'article'), isNull(bookWorks.archivedAt)))
.where(and(ne(bookWorks.kind, 'article'), isNull(bookWorks.archivedAt))),
getVisibility()
]);
const entries: { path: string; lastmod?: string }[] = [
...staticPaths.map((path) => ({ path })),
...staticPaths
.filter((path) => moviesVisibility === 'public' || path !== '/trackers/movies')
.map((path) => ({ path })),
...races.map((race) => ({ path: `/projects/derby/${race.slug}` })),
...articles.map((article) => ({
path: `/blog/${encodeURIComponent(article.slug)}`,