From cb01b50fbb6243557e6b4bdc58486158d906dd11 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 30 Aug 2018 16:49:38 -0500 Subject: Add option to hide related videos --- src/invidious.cr | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/invidious.cr') diff --git a/src/invidious.cr b/src/invidious.cr index d898176c..dc52467e 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -799,6 +799,10 @@ post "/preferences" do |env| captions_2 = env.params.body["captions_2"]?.try &.as(String) || "" captions = [captions_0, captions_1, captions_2] + related_videos = env.params.body["related_videos"]?.try &.as(String) + related_videos ||= "off" + related_videos = related_videos == "on" + redirect_feed = env.params.body["redirect_feed"]?.try &.as(String) redirect_feed ||= "off" redirect_feed = redirect_feed == "on" @@ -837,6 +841,7 @@ post "/preferences" do |env| "volume" => volume, "comments" => comments, "captions" => captions, + "related_videos" => related_videos, "redirect_feed" => redirect_feed, "dark_mode" => dark_mode, "thin_mode" => thin_mode, -- cgit v1.2.3