From f849cad4e288b289fd9c1b62b70d3cc3c2c7a7dc Mon Sep 17 00:00:00 2001 From: syeopite Date: Thu, 29 Apr 2021 13:43:25 -0700 Subject: [PATCH] Move channel views to separate directory --- src/invidious/routes/channels.cr | 12 ++++++------ .../views/{channel_about.ecr => channel/about.ecr} | 0 src/invidious/views/{ => channel}/channel.ecr | 0 src/invidious/views/{ => channel}/community.ecr | 0 .../{channels.ecr => channel/featured_channels.ecr} | 0 src/invidious/views/{ => channel}/playlists.ecr | 0 6 files changed, 6 insertions(+), 6 deletions(-) rename src/invidious/views/{channel_about.ecr => channel/about.ecr} (100%) rename src/invidious/views/{ => channel}/channel.ecr (100%) rename src/invidious/views/{ => channel}/community.ecr (100%) rename src/invidious/views/{channels.ecr => channel/featured_channels.ecr} (100%) rename src/invidious/views/{ => channel}/playlists.ecr (100%) diff --git a/src/invidious/routes/channels.cr b/src/invidious/routes/channels.cr index b6de7063..d4299865 100644 --- a/src/invidious/routes/channels.cr +++ b/src/invidious/routes/channels.cr @@ -38,7 +38,7 @@ module Invidious::Routes::Channels count, items = get_60_videos(channel.ucid, channel.author, page, channel.auto_generated, sort_by) end - templated "channel" + templated "channel/channel" end def self.playlists(env) @@ -59,7 +59,7 @@ module Invidious::Routes::Channels items = items.select { |item| item.is_a?(SearchPlaylist) }.map { |item| item.as(SearchPlaylist) } items.each { |item| item.author = "" } - templated "playlists" + templated "channel/playlists" end def self.community(env) @@ -88,7 +88,7 @@ module Invidious::Routes::Channels return error_template(500, ex) end - templated "community" + templated "channel/community" end def self.channels(env) @@ -126,7 +126,7 @@ module Invidious::Routes::Channels featured_channel_categories = fetch_channel_featured_channels(ucid, channel.tabs["channels"], nil, nil).not_nil! end - templated "channels" + templated "channel/featured_channels" end def self.featured_channel_category(env) @@ -151,7 +151,7 @@ module Invidious::Routes::Channels title = env.params.query["title"]? featured_channel_categories = fetch_channel_featured_channels(ucid, channel.tabs["channels"], category_param, continuation, title).not_nil! - templated "channels" + templated "channel/featured_channels" end def self.about(env) @@ -172,7 +172,7 @@ module Invidious::Routes::Channels next error_template(500, ex) end - templated "channel_about" end + templated "channel/about" end # Redirects brand url channels to a normal /channel/:ucid route diff --git a/src/invidious/views/channel_about.ecr b/src/invidious/views/channel/about.ecr similarity index 100% rename from src/invidious/views/channel_about.ecr rename to src/invidious/views/channel/about.ecr diff --git a/src/invidious/views/channel.ecr b/src/invidious/views/channel/channel.ecr similarity index 100% rename from src/invidious/views/channel.ecr rename to src/invidious/views/channel/channel.ecr diff --git a/src/invidious/views/community.ecr b/src/invidious/views/channel/community.ecr similarity index 100% rename from src/invidious/views/community.ecr rename to src/invidious/views/channel/community.ecr diff --git a/src/invidious/views/channels.ecr b/src/invidious/views/channel/featured_channels.ecr similarity index 100% rename from src/invidious/views/channels.ecr rename to src/invidious/views/channel/featured_channels.ecr diff --git a/src/invidious/views/playlists.ecr b/src/invidious/views/channel/playlists.ecr similarity index 100% rename from src/invidious/views/playlists.ecr rename to src/invidious/views/channel/playlists.ecr