Merge branch 'p-stream:production' into production

This commit is contained in:
vlOd 2026-01-07 18:06:58 +02:00 committed by GitHub
commit c483a9ed66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View file

@ -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,

View file

@ -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 ?? "",
}), }),