pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/

include TIDB api key in segment request if provided

Pas ce5bcace 1a01e8d2

+7 -1
+7 -1
src/components/player/hooks/useSkipTime.ts
··· 50 50 const skipSegmentsCacheKey = usePlayerStore((s) => s.skipSegmentsCacheKey); 51 51 const skipSegments = usePlayerStore((s) => s.skipSegments); 52 52 const setSkipSegments = usePlayerStore((s) => s.setSkipSegments); 53 + const tidbKey = usePreferencesStore((s) => s.tidbKey); 53 54 54 55 useEffect(() => { 55 56 if (!cacheKey) return; ··· 75 76 apiUrl += `&season=${meta.season.number}&episode=${meta.episode.number}`; 76 77 } 77 78 78 - const data = await mwFetch(apiUrl); 79 + const data = await mwFetch(apiUrl, { 80 + headers: { 81 + Authorization: tidbKey ? `Bearer ${tidbKey}` : undefined, 82 + } as HeadersInit, 83 + }); 79 84 80 85 const fetchedSegments: SegmentData[] = []; 81 86 ··· 287 292 meta?.episode?.number, 288 293 febboxKey, 289 294 setSkipSegments, 295 + tidbKey, 290 296 ]); 291 297 292 298 // Only return segments when they're for the current media (avoid showing stale data)