File tree Expand file tree Collapse file tree 7 files changed +15
-1
lines changed Expand file tree Collapse file tree 7 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 6565 "preferences_continue_autoplay_label" : " Autoplay next video: " ,
6666 "preferences_listen_label" : " Listen by default: " ,
6767 "preferences_local_label" : " Proxy videos: " ,
68+ "preferences_watch_history_label" : " Enable watch history: " ,
6869 "preferences_speed_label" : " Default speed: " ,
6970 "preferences_quality_label" : " Preferred video quality: " ,
7071 "preferences_quality_option_dash" : " DASH (adaptative quality)" ,
Original file line number Diff line number Diff line change 5555 "preferences_continue_autoplay_label" : " Spila næst sjálfkrafa: " ,
5656 "preferences_listen_label" : " Hlusta sjálfgefið: " ,
5757 "preferences_local_label" : " Proxy myndbönd? " ,
58+ "preferences_watch_history" : " Virkja áhorfssögu: " ,
5859 "preferences_speed_label" : " Sjálfgefinn hraði: " ,
5960 "preferences_quality_label" : " Æskilegt myndbands gæði: " ,
6061 "preferences_volume_label" : " Spilara hljóðstyrkur: " ,
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ struct ConfigPreferences
2323 property listen : Bool = false
2424 property local : Bool = false
2525 property locale : String = " en-US"
26+ property watch_history : Bool = true
2627 property max_results : Int32 = 40
2728 property notifications_only : Bool = false
2829 property player_style : String = " invidious"
Original file line number Diff line number Diff line change @@ -47,6 +47,10 @@ module Invidious::Routes::PreferencesRoute
4747 local ||= " off"
4848 local = local == " on"
4949
50+ watch_history = env.params.body[" watch_history" ]?.try & .as(String )
51+ watch_history ||= " off"
52+ watch_history = watch_history == " on"
53+
5054 speed = env.params.body[" speed" ]?.try & .as(String ).to_f32?
5155 speed ||= CONFIG .default_user_preferences.speed
5256
@@ -149,6 +153,7 @@ module Invidious::Routes::PreferencesRoute
149153 latest_only: latest_only,
150154 listen: listen,
151155 local: local,
156+ watch_history: watch_history,
152157 locale: locale,
153158 max_results: max_results,
154159 notifications_only: notifications_only,
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ module Invidious::Routes::Watch
7575 end
7676 env.params.query.delete_all(" iv_load_policy" )
7777
78- if watched && ! watched.includes? id
78+ if watched && preferences.watch_history && ! watched.includes? id
7979 Invidious ::Database ::Users .mark_watched(user.as(User ), id)
8080 end
8181
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ struct Preferences
2323 property latest_only : Bool = CONFIG .default_user_preferences.latest_only
2424 property listen : Bool = CONFIG .default_user_preferences.listen
2525 property local : Bool = CONFIG .default_user_preferences.local
26+ property watch_history : Bool = CONFIG .default_user_preferences.watch_history
2627 property vr_mode : Bool = CONFIG .default_user_preferences.vr_mode
2728 property show_nick : Bool = CONFIG .default_user_preferences.show_nick
2829
Original file line number Diff line number Diff line change 206206 <% if env.get? " user" %>
207207 <legend ><%= translate(locale, " preferences_category_subscription" ) %> </legend >
208208
209+ <div class =" pure-control-group" >
210+ <label for =" watch_history" ><%= translate(locale, " preferences_watch_history_label" ) %> </label >
211+ <input name =" watch_history" id =" watch_history" type =" checkbox" <% if preferences.watch_history %> checked <% end %> >
212+ </div >
213+
209214 <div class =" pure-control-group" >
210215 <label for =" annotations_subscribed" ><%= translate(locale, " preferences_annotations_subscribed_label" ) %> </label >
211216 <input name =" annotations_subscribed" id =" annotations_subscribed" type =" checkbox" <% if preferences.annotations_subscribed %> checked <% end %> >
You can’t perform that action at this time.
0 commit comments