Commit Graph
207 Commits
Author SHA1 Message Date
ner 05a4ae298b fix(show-type): a11y-valid button trigger, anchor menu to logo end 2026-09-25 16:55:58 +03:00
ner cc5782af44 style(player): two-row controls on small screens, tight right cluster, 5s controls idle delay 2026-09-25 16:43:33 +03:00
ner 88f51f783e style(show-type): compact Watch Next dropdown menu and items 2026-09-25 14:43:01 +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 5b41dbca10 fix(ui): track top modal overlay in JS, Safari does not re-evaluate :has() on removal 2026-09-13 19:32:35 +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
ner c52d798221 feat(torrents): launched state, year-scoped Toloka search, stacked modal backdrops
- replace pin-to-top with persistent launched-once state (filled play/cast icons)
- move download/vlc actions into a more-options dropdown when cast is available
- scope Toloka search query by show year (no IMDB filter on the tracker)
- strip session sid from Toloka download hrefs so cached magnets stay valid
- restore row hover, subtle row borders, taller rows; drop table rounding
- stacked modal backdrops: :has(~ [data-overlay]) instead of :not(:last-of-type)
- only count search in analytics after the query has settled (1s debounce)
2026-09-13 14:06:27 +03:00
nerandClaude Opus 5 66776c582f refactor(analytics): send titles alongside ids, drop comments
Bare ids are unreadable in the dashboard, so every event that points at a
show or a person now carries its title or name. Ids stay for disambiguation,
since titles collide across remakes.

- ShowRef gains showTitle, so show_viewed, library_toggled, torrents_searched,
  torrent_selected, playback_started and playback_failed all report it
- person_viewed sends personName
- random_shuffled sends the title of the movie scrolled to
- torrent_selected sends the torrent title next to the show title
- subtitles_selected sends the track label, such as English, rather than the
  internal track value

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 12:44:38 +03:00
nerandClaude Opus 5 01753d4eb6 refactor(analytics): method per event instead of track(name, props)
analytics.showViewed({...}) reads better than track('show_viewed', {...}) and
drops the track_ alias Captions needed, where vidstack already exports track.

The methods are derived from the event catalogue with a mapped type plus a
Proxy rather than written out, so the catalogue stays the only place an event
is declared and the two cannot drift. Names stay snake_case on the wire.
Emitters are cached so a method is referentially stable and safe to pass to a
hook or use as an effect dependency.

Events with no payload are typed void and take no arguments.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 12:39:54 +03:00
nerandClaude Opus 5 d67a0d4df6 feat(analytics): self-hosted openpanel with a typed event catalogue
Replaces Vercel Analytics with OpenPanel, driven entirely by env vars so the
whole layer is inert until NEXT_PUBLIC_OPENPANEL_CLIENT_ID is set.

Zero initial load cost. next/script emits a rel=preload even on lazyOnload,
which pulls the sdk during the first paint, so the component skips it: it
inlines the 416 byte official stub (window.op queues calls immediately) and
appends the real script itself on window load plus requestIdleCallback. The
built html carries no preload and no script src for the analytics host.

Events live in one typed catalogue (lib/analytics/events.ts) and track() is
keyed to it, so a wrong name or payload is a type error rather than a silent
bad row. Emitters sit in the hooks that already own the behaviour instead of
being sprinkled through components:

- useShowState covers every favourite and watchlist toggle
- useInfiniteList covers pagination for all six lists
- useTorrents covers all three providers
- Preview, Person and useSearch use a shared useTrackOnce hook

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 12:08:16 +03:00
nerandClaude Opus 5 0186c793f2 feat(seo): crawlable card links, listing metadata, similar prefetch
Following links reached only 37 of 1873 urls and the frontier was exhausted
at depth 3, because detail pages rendered no internal links server side.

- Prefetch similar shows on detail pages so their links land in the ssr html.
  Crawl reach goes from 37 pages to 782 and keeps growing. Credits are left
  client side on purpose: dehydrating aggregate_credits pushed a series page
  from 52kb to 600kb to surface only ten person links.
- Replace the aria-label on poster links with sr-only text, so the anchors
  carry real anchor text instead of being empty. Text content is also a
  better accessible name than aria-label.
- Give popular and top their own openGraph and twitter tags. They inherited
  the generic homepage title and description.
- Add og:image:alt on movie, tv and person pages.
- Add ItemList json-ld to the listing pages.
- Drop favorites, watchlist and opengraph-image from the sitemap, and remove
  the robots.txt disallow that kept crawlers from reading their noindex.
- Raise detail revalidate to a week. Cast and release dates barely move, and
  it cuts regenerations, isr writes and origin transfer sevenfold now that
  more pages get crawled.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:23:00 +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 c695697c4f feat(tlk): include app origin in m3u for refresh callback
Pass the app origin alongside the Toloka thread id so the TV knows
which host to call /api/refresh on.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-07 20:35:04 +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 Opus 4.8 284458f783 feat(torrents): pass tmdb_id and season to m3u stream for series
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>
2026-08-07 19:14:59 +03:00
nerandClaude Fable 5 735c63471a feat(seo): slugged show urls, sr-only homepage intro, ISR detail pages
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 17:46:01 +03:00
nerandClaude Fable 5 ce630cd029 feat(seo): JSON-LD for movies, series, persons, website
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 17:11:50 +03:00
nerandClaude Fable 5 cd34f4eb5f feat(seo): heading structure + SSR person profile
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 17:07:48 +03:00
nerandClaude Fable 5 8b56268430 refactor(preview): restore in-place modal, keep crawlable links
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 16:48:11 +03:00
nerandClaude Fable 5 25a5d535a4 feat(seo): crawlable show links, intercepted preview modal, real 404s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 16:33:59 +03:00
nerandClaude Opus 4.8 919dcf9a42 fix(player): keep player hidden behind splash until buffered
The vidstack UI flashed through the splash screen on play. Hide the
player container with opacity while buffering (kept mounted so Safari
autoplay still fires). Also drop the animated border and spinner from
the splash, leaving the center-out reveal and labels.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-07 15:57:26 +03:00
nerandClaude Opus 4.8 204acef185 feat(torrents): unsupported-codec handling + animated preload border
Detect the /gst transcoder's 502 "unsupported video codec/container"
response, surface a clear in-player message instead of an endless
spinner, and grey out Play for releases that already failed (persisted
by infohash). Replace the buffering spinner with a rounded player and
an animated conic border sweep.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-07 15:16:18 +03:00
nerandClaude Fable 5 526f0c24e0 refactor(torrents): move pin into row actions
Move the pin toggle out of the title cell into the row's action
buttons (next to play) and drop the hover-reveal animation, so the
title column stays clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 00:30:00 +03:00
nerandClaude Fable 5 461ff51721 feat(torrents): persist pinned Toloka magnets, bookmark icon
Cache the fetched magnet of a pinned torrent in localStorage so a
pinned Toloka row stays playable right after a reload without
re-fetching from Toloka; the magnet is dropped when unpinned. Also
switch the pin control to a bookmark icon.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 22:51:05 +03:00
nerandClaude Fable 5 06f142510b feat(torrents): pin played torrents to the top
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>
2026-08-06 22:38:57 +03:00
nerandClaude Fable 5 c144181881 feat(torrents): hide YTS provider for series
YTS is a movies-only API, so drop its tab and skip its request when
viewing a TV series; the tab grid adapts to the remaining providers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 22:20:26 +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
ner c5f64af5aa fix: play button bleeding 2026-08-05 19:03:01 +03:00
ner c3adad3fc4 extract YearHint component; fix fetchPriority casing 2026-08-05 18:45:17 +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
nerandClaude Opus 4.8 a25252c66d fix: cap hls.js buffers so constrained TV browsers survive seeks
LG webOS (and similar TV browsers) hang when seeking 4K HEVC: hls.js
keeps a large back-buffer and the seek-time flush/re-append spikes
memory past what the TV can handle. Pass a conservative hls.js config
(short backBufferLength, capped max buffer length/size) via the Vidstack
HLS provider; still ample for desktop playback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-31 16:31:10 +03:00
nerandClaude Opus 4.8 def565cf3b fix: set crossOrigin on the player so cross-origin HLS subtitles render
Vidstack loads text-track cues via JS; cross-origin subtitle tracks
(served by TorrServer on another origin) need the crossorigin attribute
on the media element to render. Also required for native HLS on iOS/TV
to use the cross-origin stream.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-31 15:55:46 +03:00
nerandClaude Opus 4.8 3538738bb9 feat: play MKV/HEVC in-browser via TorrServer -gst HLS with track selection
Route MKV/WebM/AVI through TorrServer's native /gst HLS (copy-mode: HEVC
kept, audio->AAC, keyframe-aligned segments with real duration + seeking)
and play MP4 directly. Add an audio-track menu sourced from /gst/probe
(switching reloads with &audio=N and resumes position), surface the HLS
subtitle tracks through the existing captions menu, and show the Play
button for every video container.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-31 14:28:52 +03:00
nerandClaude Sonnet 4.6 07bbb576f6 perf: mark hero poster image as high fetch priority
Lighthouse flagged the LCP carousel poster for missing fetchpriority=high.
Adds a priority prop to Poster that emits the lowercase fetchpriority
attribute (untyped in this @types/react version, so React forwards it
through as a custom attribute) only on the eagerly-rendered hero image.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 23:08:32 +03:00
nerandClaude Sonnet 4.6 dec6560cf0 fix: don't spread dnd-kit attributes onto sortable tab triggers
useSortable's `attributes` (role="button", tabIndex, aria-pressed) were
overriding Radix Tabs.Trigger's own role="tab" and roving-tabindex
management, producing an invalid ARIA tab/role combination that
regressed the accessibility audit. `listeners` alone (onPointerDown /
onKeyDown) is sufficient to drive the drag — the trigger is already a
properly accessible, focusable element.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 22:32:06 +03:00
nerandClaude Sonnet 4.6 b31bd062e2 feat: drag-to-reorder torrent provider tabs with localStorage persistence
Lets users customize the order of YTS / Pirate Bay / Toloka tabs in the
torrent search modal via drag-and-drop; the saved order also determines
which provider opens by default. dnd-kit is isolated to the modal's
lazily-loaded chunk so it doesn't affect the main bundle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 22:20:19 +03:00
Hryvenko Ihor fef5838a23 fix: handle stream link 2026-05-01 22:51:08 +03:00
Hryvenko Ihor d7e4d07497 fix: handle stream link 2026-05-01 22:46:59 +03:00
Hryvenko Ihor 88c5410945 fix: handle stream link 2026-05-01 22:46:37 +03:00
Hryvenko Ihor 067c4a65ef fix: handle stream link 2026-05-01 22:32:33 +03:00
Hryvenko Ihor c34f8fd3d0 fix: m3u emitter for safari 2026-05-01 22:26:00 +03:00
Hryvenko Ihor 7b5420a989 fix: handle stream link 2026-05-01 13:50:44 +03:00
Hryvenko IhorandClaude Opus 4.7 c77dcf913d feat(torrents): pass show metadata to m3u stream request
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 12:30:04 +03:00
ner f447cf3423 fix: new address for yts provider 2025-12-13 20:16:46 +02:00
ner f790cfef2a fix: prevent new tab from being focused 2025-08-31 16:35:06 +03:00
ner cc3a83d767 fix: prevent new tab from being focused 2025-08-30 13:58:02 +03:00
ner bd708ff8a5 fix: vlc icon changed 2025-08-24 13:21:36 +03:00