mirror of
https://github.com/p-stream/p-stream.git
synced 2026-01-11 20:10:32 +00:00
Compare commits
2 commits
7716ec0058
...
c483a9ed66
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c483a9ed66 | ||
|
|
a0a095bb12 |
2 changed files with 12 additions and 2 deletions
|
|
@ -160,6 +160,16 @@ export function useSkipTracking(
|
|||
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
|
||||
const skipEvent: SkipEvent = {
|
||||
startTime: skipSessionStartRef.current,
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ export function SkipTracker() {
|
|||
skip_duration: skip.skipDuration,
|
||||
content_id: meta?.tmdbId,
|
||||
content_type: meta?.type,
|
||||
season_id: meta?.season?.tmdbId,
|
||||
episode_id: meta?.episode?.tmdbId,
|
||||
season: meta?.season?.number,
|
||||
episode: meta?.episode?.number,
|
||||
confidence: adjustedConfidence,
|
||||
turnstile_token: turnstileToken ?? "",
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in a new issue