diff --git a/.gitignore b/.gitignore index 7a26e1a6d..2a49e68d7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /invidious /sentry /config/config.yml +.DS_Store \ No newline at end of file diff --git a/config/config.example.yml b/config/config.example.yml index 4c9f0cca5..5f41a4f7e 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -629,9 +629,9 @@ default_user_preferences: ## Each entry can be one of: "Popular", "Trending", ## "Subscriptions", "Playlists", "Compilations" ## - ## Default: ["Popular", "Trending", "Subscriptions", "Playlists","Compilations"] (show all feeds) + ## Default: ["Popular", "Trending", "Subscriptions", "Playlists", "Compilations"] (show all feeds) ## - #feed_menu: ["Popular", "Trending", "Subscriptions", "Playlists","Compilations"] + feed_menu: ["Popular", "Trending", "Subscriptions", "Playlists", "Compilations"] ## ## Default feed to display on the home page. diff --git a/src/invidious/routes/compilations.cr b/src/invidious/routes/compilations.cr new file mode 100644 index 000000000..600d34de6 --- /dev/null +++ b/src/invidious/routes/compilations.cr @@ -0,0 +1,2 @@ +module Invidious::Routes::Compilations +end \ No newline at end of file diff --git a/src/invidious/routes/feeds.cr b/src/invidious/routes/feeds.cr index cc275dfe7..affd165d9 100644 --- a/src/invidious/routes/feeds.cr +++ b/src/invidious/routes/feeds.cr @@ -6,6 +6,8 @@ module Invidious::Routes::Feeds end def self.compilations(env) + locale = env.get("preferences").as(Preferences).locale + templated "feeds/compilations" end diff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.cr index 6d410e876..eea938581 100644 --- a/src/invidious/routes/preferences.cr +++ b/src/invidious/routes/preferences.cr @@ -186,7 +186,7 @@ module Invidious::Routes::PreferencesRoute 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 - 4.times do |index| + 5.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/compilation.ecr b/src/invidious/views/compilation.ecr index e69de29bb..0dff74177 100644 --- a/src/invidious/views/compilation.ecr +++ b/src/invidious/views/compilation.ecr @@ -0,0 +1,6 @@ +<% title = HTML.escape(compilation.title) %> +<% author = HTML.escape(compilation.author) %> + +<% content_for "header" do %> +