31 Commits
Author SHA1 Message Date
ner c41f1f098f feat(torrents): add Galaxy (TorrentGalaxy) provider with IMDb-first search and inline magnets
- new tg parser: /imdb-detail/<tt...> when an IMDb id is available (exact title, local seeder/size sort), keyword search as fallback; rows carry full magnets inline so Play works without a second fetch
- wire tg into /api/torrents and /api/magnet, TG_HOST env (default https://torrentgalaxy.info)
- Galaxy tab in the torrents modal; tabs now share equal space and hidden-scroll on overflow
- fix tab drag&drop: reorder on the sanitized order so tabs added later (like Galaxy) can be dragged
2026-10-25 18:24:08 +02:00
ner 1fd8f0f7e5 feat(torrents): add 0day.community tracker as a torrent provider
Private xbtit tracker (tracker.0day.community): session login via
takelogin.php with cookie jar persisted to Redis, cp1251-decoded
word-AND search scoped to movie/TV categories, magnet built from the
fetched .torrent (download.php requires the name param) + public
trackers. Generalizes /api/magnet to dispatch by provider.
2026-10-25 17:09:51 +02:00
ner 87513bb6a8 fix(search): drop results whose title shares no query token (TMDB loose-match noise) 2026-10-23 21:21:55 +03:00
ner 5df24ff113 fix(search): rank by votes-weighted rating so 1-vote outliers don't top results 2026-10-23 21:12:46 +03:00
ner 6cff846f94 feat(search): unified movie+series search, results ranked by rating 2026-10-23 21:01:35 +03:00
ner 75880e5ac7 feat(tlk): cartoon/anime sections and alias-aware search 2026-10-23 20:51:53 +03:00
ner 8c8d752962 perf(tmdb): trim responses to fields the UI uses, in proxy and server client
Move the trimmer from the route into a shared lib/tmdbTrim and apply it in
the server-side client too (server hits TMDB directly, bypassing the proxy),
so both paths return identical shapes. Show page HTML drops ~22%
(88.4KB -> 68.8KB); TV details payload -90%.
2026-09-25 16:05:45 +03:00
ner 09aceccec9 feat(trending): amazon tab, tab group divider and arrow-hover wheel scroll
- Amazon tab for the series trending row (TMDB provider 9, Amazon
  Prime Video US), lazy-loaded like Netflix/HBO
- Nav renders a divider before tabs flagged with 'divider', separating
  the trending group from Similar/Recommendations (no leading divider
  on the show-page preview)
- Vertical wheel now steps the row card-by-card only while hovering the
  prev/next arrow zones: deltas accumulate and a smooth scroll lands on
  the next/previous snap point, so mandatory snap never pulls back.
  Everywhere else the wheel scrolls the page as before
2026-09-24 16:25:35 +03:00
ner f22f3c45b4 feat(show-type): path-based /series filter and infinite trending galleries
Persist the show-type filter in the path via a /series prefix: movies
keep bare URLs, series use /series across random, popular, top,
favorites and watchlist. The path is the single source of truth - the
jotai atom is removed and the toggle navigates with router.replace so
the server prefetches the target variant. Legacy ?type=tv deep links
redirect to the prefixed URLs.

Trending and similar/recommendations queries are now paginated and feed
useInfiniteList like the main lists. Gallery wires fetchNextPage to a
new ScrollNavigation onEndReached callback (fires within two slides of
the end, once per approach), so all gallery tabs load more on scroll.
The show page prefetches the first similar page with
prefetchInfiniteQuery, and trending/similar/recommendations are added
to the analytics ListName.
2026-09-24 15:54:40 +03:00
ner 0824090c6d feat(show-type): global movie/series toggle, type-aware pages and search, ?type=tv in URL 2026-09-24 15:40:01 +03:00
ner f642dad64e feat(torrents): Toloka section filter by show type, year scope for movies only 2026-09-13 19:14:42 +03:00
nerandClaude Opus 5 01792a9669 perf(cache): edge-cache tmdb proxy, call tmdb directly on server, enable ISR
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>
2026-08-14 10:41:09 +03:00
nerandClaude Opus 4.8 ecc57ff135 feat(player): external subtitles via OpenSubtitles
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>
2026-08-08 13:17:12 +03:00
nerandClaude Opus 4.8 3ddba5e6a2 feat(tlk): refresh endpoint to re-pull a thread's current magnet
Add /api/refresh?tid=<id> that re-downloads a Toloka thread's .torrent
server-side and returns a fresh magnet + m3u. Pass the thread id (tlk)
into the m3u params for series. Drop the per-magnet cache so refreshes
always reflect the thread's current state (new episodes while airing).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-07 20:24:44 +03:00
nerandClaude Fable 5 2e81908b22 feat(torrents): series parsing, S:E/Year columns, magnet cache
- parse Toloka Ukrainian season/episode naming (Сезони 1-10,
  серій 7 з 8, homoglyphs) into a clean title + episodes field
- add series-only sortable S:E column, desktop-only Year column;
  strip year/source meta from the title cell
- filter out torrents with fewer than 5 seeders in the API route
- cache Toloka magnets in Redis so each .torrent is downloaded once
  across serverless instances; append public trackers to magnets
  (never the passkey-bearing announce URLs from the .torrent)
- fix play button hover state while magnet is pending

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 22:14:58 +03:00
nerandClaude Fable 5 131beeb07f feat(tlk): persist Toloka session in Redis across cold starts
Store the serialized cookie jar in Upstash Redis after login and
restore it on instance start, so serverless cold starts reuse the
session instead of re-authenticating. Falls back to the previous
in-memory behavior when Redis is not configured or unavailable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 21:02:13 +03:00
nerandClaude Opus 5 3dc2ebfe53 feat: replace the starring page with a person page
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>
2026-08-04 22:09:33 +03:00
nerandClaude Opus 5 6fc41c0901 feat: surface availability, airing progress and the director in preview
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>
2026-08-04 19:46:51 +03:00
ner f447cf3423 fix: new address for yts provider 2025-12-13 20:16:46 +02:00
ner 6fc34e3797 feat: video format restrictions 2025-08-15 18:42:49 +03:00
ner 82c14c1d5c feat: added download status 2025-08-14 21:38:24 +03:00
ner fbbd7b52e3 fix: authorization 2024-11-11 19:32:52 +02:00
ner 183c7231a1 feat: show page 2024-11-06 22:12:19 +02:00
ner 995342f18a feat: proxy cache 2024-11-03 17:42:40 +02:00
ner 3b954279f7 fix: proper prefetch 2024-10-29 19:39:41 +02:00
ner c9ca262da8 fix: back to prefetch 2024-10-29 18:25:52 +02:00
ner e9c0f3bef3 feat: ReactQueryStreamedHydration 2024-10-29 09:33:42 +02:00
ner 62791957bf fix: server's root path 2024-10-29 08:47:08 +02:00
ner ece48e90c6 refactoring: server actions => tmdb proxy 2024-10-28 20:08:41 +02:00
ner 97d55b24a1 refactoring: server actions => tmdb proxy 2024-10-28 20:04:36 +02:00
ner dfdfb79169 fix: SITE_URL 2024-10-28 17:20:05 +02:00