mirror of
https://github.com/p-stream/p-stream.git
synced 2026-01-11 20:10:32 +00:00
Merge branch 'p-stream:production' into production
This commit is contained in:
commit
c483a9ed66
2 changed files with 12 additions and 2 deletions
|
|
@ -160,6 +160,16 @@ export function useSkipTracking(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only report skips where end time is greater than start time
|
||||||
|
if (currentTime <= skipSessionStartRef.current) {
|
||||||
|
// Reset session state without creating event
|
||||||
|
isInSkipSessionRef.current = false;
|
||||||
|
skipSessionStartRef.current = 0;
|
||||||
|
sessionTotalRef.current = 0;
|
||||||
|
skipWindowRef.current = [];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Create skip event for completed session
|
// Create skip event for completed session
|
||||||
const skipEvent: SkipEvent = {
|
const skipEvent: SkipEvent = {
|
||||||
startTime: skipSessionStartRef.current,
|
startTime: skipSessionStartRef.current,
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ export function SkipTracker() {
|
||||||
skip_duration: skip.skipDuration,
|
skip_duration: skip.skipDuration,
|
||||||
content_id: meta?.tmdbId,
|
content_id: meta?.tmdbId,
|
||||||
content_type: meta?.type,
|
content_type: meta?.type,
|
||||||
season_id: meta?.season?.tmdbId,
|
season: meta?.season?.number,
|
||||||
episode_id: meta?.episode?.tmdbId,
|
episode: meta?.episode?.number,
|
||||||
confidence: adjustedConfidence,
|
confidence: adjustedConfidence,
|
||||||
turnstile_token: turnstileToken ?? "",
|
turnstile_token: turnstileToken ?? "",
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue