diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-08-30 16:49:38 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-08-30 16:49:38 -0500 |
| commit | cb01b50fbb6243557e6b4bdc58486158d906dd11 (patch) | |
| tree | 00a8f1edbfee572aee362ad081f5c5b5d6e8538d /src/invidious.cr | |
| parent | 6b3c9d23d025148da76f1b24dd968d61ae3a882a (diff) | |
| download | invidious-cb01b50fbb6243557e6b4bdc58486158d906dd11.tar.gz invidious-cb01b50fbb6243557e6b4bdc58486158d906dd11.tar.bz2 invidious-cb01b50fbb6243557e6b4bdc58486158d906dd11.zip | |
Add option to hide related videos
Diffstat (limited to 'src/invidious.cr')
| -rw-r--r-- | src/invidious.cr | 5 |
1 files changed, 5 insertions, 0 deletions
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, |
