tangled
alpha
login
or
join now
dunkirk.sh
/
pstream-ng
1
fork
atom
pstream is dead; long live pstream
taciturnaxolotl.github.io/pstream-ng/
1
fork
atom
overview
issues
pulls
pipelines
include TIDB api key in segment request if provided
Pas
1 month ago
ce5bcace
1a01e8d2
+7
-1
1 changed file
expand all
collapse all
unified
split
src
components
player
hooks
useSkipTime.ts
+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
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
78
-
const data = await mwFetch(apiUrl);
79
79
+
const data = await mwFetch(apiUrl, {
80
80
+
headers: {
81
81
+
Authorization: tidbKey ? `Bearer ${tidbKey}` : undefined,
82
82
+
} as HeadersInit,
83
83
+
});
79
84
80
85
const fetchedSegments: SegmentData[] = [];
81
86
···
287
292
meta?.episode?.number,
288
293
febboxKey,
289
294
setSkipSegments,
295
295
+
tidbKey,
290
296
]);
291
297
292
298
// Only return segments when they're for the current media (avoid showing stale data)