From f5a0a6b899241af4ebaea7ede1dc4cfb10c6d471 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 bf38b12e..1b3544b1 100644 --- a/src/invidious/routes/channels.cr +++ b/src/invidious/routes/channels.cr @@ -37,7 +37,7 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute items.reject! &.paid end - templated "channel" + templated "channel/channel" end def playlists(env) @@ -59,7 +59,7 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute 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 community(env) @@ -88,7 +88,7 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute return error_template(500, ex) end - templated "community" + templated "channel/community" end def channels(env) @@ -126,7 +126,7 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute featured_channel_categories = fetch_channel_featured_channels(ucid, channel.tabs["channels"], nil, nil).not_nil! end - templated "channels" + templated "channel/featured_channels" end def featured_channel_category(env) @@ -151,7 +151,7 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute 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 about(env) @@ -161,7 +161,7 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute end locale, user, subscriptions, continuation, ucid, channel = data - templated "channel_about" + templated "channel/about" end private def fetch_basic_information(env) 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