mirror of
https://github.com/iv-org/invidious.git
synced 2026-05-02 02:59:38 -05:00
fix: avoid marking as watched when watch history is disabled
This commit is contained in:
parent
1de17b1250
commit
161f70e303
@ -198,6 +198,9 @@ player.on('timeupdate', function () {
|
|||||||
elem_iv_listen.href = addCurrentTimeToURL(base_url_iv_listen, domain);
|
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
|
// 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 isOneSecondDifference = current_ts - last_player_time === 1;
|
||||||
const exceedsMarkWatchedAfterDuration = time_watched > MARK_WATCHED_AFTER_DURATION;
|
const exceedsMarkWatchedAfterDuration = time_watched > MARK_WATCHED_AFTER_DURATION;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user