summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaltycrys <73420320+saltycrys@users.noreply.github.com>2020-12-19 19:30:42 +0100
committersaltycrys <73420320+saltycrys@users.noreply.github.com>2020-12-19 19:30:42 +0100
commitef96a50cea856da6b81801b835cca71d87b627c4 (patch)
treef851bdf98bdcc2cd86d974bbb654d9ac838865b9
parentc7c732ebc0f4b1b1847b2e0b6442e971845d9fbd (diff)
downloadinvidious-ef96a50cea856da6b81801b835cca71d87b627c4.tar.gz
invidious-ef96a50cea856da6b81801b835cca71d87b627c4.tar.bz2
invidious-ef96a50cea856da6b81801b835cca71d87b627c4.zip
Remove "Top" feed option from preferences
The Top feed used to be a feed based on YouTube ratings. Once YouTube removed publicly available ratings the Top feed was removed from Invidious but the option to display a link to it remained.
-rw-r--r--src/invidious/routes/user_preferences.cr4
-rw-r--r--src/invidious/views/preferences.ecr4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/invidious/routes/user_preferences.cr b/src/invidious/routes/user_preferences.cr
index 732c051f..3e4ec330 100644
--- a/src/invidious/routes/user_preferences.cr
+++ b/src/invidious/routes/user_preferences.cr
@@ -74,7 +74,7 @@ class Invidious::Routes::UserPreferences < Invidious::Routes::BaseRoute
default_home = env.params.body["default_home"]?.try &.as(String) || CONFIG.default_user_preferences.default_home
feed_menu = [] of String
- 5.times do |index|
+ 4.times do |index|
option = env.params.body["feed_menu[#{index}]"]?.try &.as(String) || ""
if !option.empty?
feed_menu << option
@@ -146,7 +146,7 @@ class Invidious::Routes::UserPreferences < Invidious::Routes::BaseRoute
config.default_user_preferences.default_home = env.params.body["admin_default_home"]?.try &.as(String) || config.default_user_preferences.default_home
admin_feed_menu = [] of String
- 5.times do |index|
+ 4.times do |index|
option = env.params.body["admin_feed_menu[#{index}]"]?.try &.as(String) || ""
if !option.empty?
admin_feed_menu << option
diff --git a/src/invidious/views/preferences.ecr b/src/invidious/views/preferences.ecr
index 5384e067..aebdab9e 100644
--- a/src/invidious/views/preferences.ecr
+++ b/src/invidious/views/preferences.ecr
@@ -130,9 +130,9 @@
</div>
<% if env.get?("user") %>
- <% feed_options = {"", "Popular", "Top", "Trending", "Subscriptions", "Playlists"} %>
+ <% feed_options = {"", "Popular", "Trending", "Subscriptions", "Playlists"} %>
<% else %>
- <% feed_options = {"", "Popular", "Top", "Trending"} %>
+ <% feed_options = {"", "Popular", "Trending"} %>
<% end %>
<div class="pure-control-group">