mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-21 02:18:52 +00:00
Make the history recording optional.
This commit is contained in:
@@ -47,6 +47,10 @@ module Invidious::Routes::PreferencesRoute
|
||||
local ||= "off"
|
||||
local = local == "on"
|
||||
|
||||
watch_history = env.params.body["watch_history"]?.try &.as(String)
|
||||
watch_history ||= "off"
|
||||
watch_history = watch_history == "on"
|
||||
|
||||
speed = env.params.body["speed"]?.try &.as(String).to_f32?
|
||||
speed ||= CONFIG.default_user_preferences.speed
|
||||
|
||||
@@ -149,6 +153,7 @@ module Invidious::Routes::PreferencesRoute
|
||||
latest_only: latest_only,
|
||||
listen: listen,
|
||||
local: local,
|
||||
watch_history: watch_history,
|
||||
locale: locale,
|
||||
max_results: max_results,
|
||||
notifications_only: notifications_only,
|
||||
|
||||
@@ -75,7 +75,7 @@ module Invidious::Routes::Watch
|
||||
end
|
||||
env.params.query.delete_all("iv_load_policy")
|
||||
|
||||
if watched && !watched.includes? id
|
||||
if watched && preferences.watch_history && !watched.includes? id
|
||||
Invidious::Database::Users.mark_watched(user.as(User), id)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user