Three exceeded Vercel free tier limits (edge requests, function invocations,
fast origin transfer) all traced back to nothing being cached.
- Http defaults preventCache to false and the tmdb proxy now sends a real
Cache-Control, so public responses are edge cached instead of missing on
every request. Session scoped calls keep private, no-store.
- On the server movieAdvisor talks to tmdb directly. It used to fetch its own
public /api/tmdb url, billing a second edge request, a second function
invocation and the whole payload as origin transfer per server render.
- Add generateStaticParams to movie, tv and person pages. Without it Next
treats the segment as fully dynamic and ignores revalidate, so the pages
re-rendered on every request instead of using ISR.
- Trim credits and person payloads in the proxy: credits 72kb to 13kb,
aggregate_credits 308kb to 102kb, person 191kb to 124kb. Only fields no
mapper reads are dropped, mapped output is unchanged.
- Detail pages are cached now, so only a real tmdb 404 becomes notFound and
other failures bubble up instead of being baked in as a 404 for a day.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Add an OpenSubtitles client, /api/subtitles routes and useSubtitles to
fetch subtitles by show/episode/filename, wire them as player tracks
alongside embedded ones, and strip hls.js's auto-added tracks. New
OPENSUBTITLES_* / SUBTITLE_LANGUAGES env vars (documented in env.example).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add seasonFromEpisodes (single season only, skips ranges) and include
tmdb_id plus the resolved season in the m3u/cast stream params.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pin torrents (via the pin toggle or automatically on play/stream) so
they stick to the top of the list regardless of the active sort, and
persist the pins to localStorage. The pin sits before the title,
revealing on row hover on desktop and always shown on touch or when
pinned.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A credit now opens /person/{id}: portrait, name, department, life dates and
birthplace, the biography, and the full filmography ranked by vote count.
One request carries all of it — combined_credits rides along on the person
call — so the discover based starring query and its with_people filter go.
The biography fills whatever height the portrait leaves and fades where it
is cut, with the whole text in a tooltip on hover; a phone has no height to
respect there, so it simply runs on.
Route level and query level skeletons stand in while it loads, built from
the shadcn primitive.
Development server side fetches go over the loopback rather than SITE_URL,
which is a LAN address meant for other devices: once that address moves the
fetch hangs until undici times out, ten seconds per navigation.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Movies get a theatre/stream/blu-ray icon in the info row, series get the
latest aired episode as S03 E07. Both reveal the relevant dates on hover or
tap through a shared Hint tooltip.
Release dates ride along on the details request via append_to_response and
the series fields are already in the tv payload, so neither indicator costs
an extra call. Theatre state is only claimed while the run can still be
current, otherwise a classic with no digital entry would read as in cinemas.
The credits carousel now opens with the director, read from the crew array
that the credits response already carries. A series has no single director,
so the one behind most episodes stands in.
Drop with_cast from the starring query: TMDB ANDs it with with_people, so
every director link would have resolved to an empty list.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>