fix: avoid marking as watched when watch history is disabled

This commit is contained in:
Gus Libens 2026-04-29 16:06:31 +02:00
parent 1de17b1250
commit 161f70e303
No known key found for this signature in database
GPG Key ID: 032E49D0FE9D51EA

View File

@ -198,6 +198,9 @@ player.on('timeupdate', function () {
elem_iv_listen.href = addCurrentTimeToURL(base_url_iv_listen, domain);
}
// User has watch history disabled
if (!video_data.preferences.watch_history) return;
// Only increase time watched when the time difference is one second and the video has not been marked as watched
const isOneSecondDifference = current_ts - last_player_time === 1;
const exceedsMarkWatchedAfterDuration = time_watched > MARK_WATCHED_AFTER_DURATION;