Phase 1: lock cron, reload chaud, argon2, providers, IMDb lookup, cache LRU, /health, /metrics, rate limit, UI dark, biome

This commit is contained in:
unfr
2026-04-24 07:35:10 +02:00
parent f9745a2390
commit a184a21f57
36 changed files with 2060 additions and 364 deletions

View File

@@ -3,8 +3,8 @@
import { createReadStream, existsSync, readFileSync } from 'node:fs';
import { writeFile } from 'node:fs/promises';
import { createInterface } from 'node:readline';
import { join } from 'node:path';
import { createInterface } from 'node:readline';
import { TMDBINTEGRAL_DIR } from '../config.js';
import { entryPath } from '../lib/paths.js';
@@ -22,12 +22,20 @@ export async function buildMapping(type) {
for await (const line of rl) {
if (!line) continue;
let obj;
try { obj = JSON.parse(line); } catch { continue; }
try {
obj = JSON.parse(line);
} catch {
continue;
}
const tmdb = obj.id;
const path = entryPath(type, tmdb);
if (!existsSync(path)) continue;
let detail;
try { detail = JSON.parse(readFileSync(path, 'utf8')); } catch { continue; }
try {
detail = JSON.parse(readFileSync(path, 'utf8'));
} catch {
continue;
}
const imdb = detail?.external_ids?.imdb_id;
if (imdb) {
data1[tmdb] = imdb;