From c695697c4f9f818e14d80cd198a459c0f414cb03 Mon Sep 17 00:00:00 2001 From: ner Date: Fri, 7 Aug 2026 20:35:04 +0300 Subject: [PATCH] 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 --- .../components/TorrentsTable/components/Actions/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/index.tsx b/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/index.tsx index 5107bc9..17d13d9 100644 --- a/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/index.tsx +++ b/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/index.tsx @@ -96,7 +96,12 @@ const Actions: FC = ({ torrent, title, provider, show }) => { // magnet, so a still-airing season picks up new episodes on its own. if (provider === providers.tlk.key && torrent.download) { const tid = new URLSearchParams(torrent.download.split('?')[1] || '').get('id'); - if (tid) params.set('tlk', tid); + if (tid) { + params.set('tlk', tid); + // where /api/refresh lives (this app's origin) — distinct from the + // m3u stream host, so the TV knows which host to call back. + params.set('app', window.location.origin); + } } }