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>
This commit is contained in:
1 parent
3ddba5e6a2
commit
c695697c4f
1 file changed
+6
-1
+6
-1
@@ -96,7 +96,12 @@ const Actions: FC<Props> = ({ torrent, title, provider, show }) => {
|
|||||||
// magnet, so a still-airing season picks up new episodes on its own.
|
// magnet, so a still-airing season picks up new episodes on its own.
|
||||||
if (provider === providers.tlk.key && torrent.download) {
|
if (provider === providers.tlk.key && torrent.download) {
|
||||||
const tid = new URLSearchParams(torrent.download.split('?')[1] || '').get('id');
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user