Move channel views to separate directory

This commit is contained in:
syeopite 2021-04-29 13:43:25 -07:00
parent e9dcac9bd4
commit f5a0a6b899
No known key found for this signature in database
GPG key ID: 6FA616E5A5294A82
6 changed files with 6 additions and 6 deletions

View file

@ -37,7 +37,7 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute
items.reject! &.paid items.reject! &.paid
end end
templated "channel" templated "channel/channel"
end end
def playlists(env) 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 = items.select { |item| item.is_a?(SearchPlaylist) }.map { |item| item.as(SearchPlaylist) }
items.each { |item| item.author = "" } items.each { |item| item.author = "" }
templated "playlists" templated "channel/playlists"
end end
def community(env) def community(env)
@ -88,7 +88,7 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute
return error_template(500, ex) return error_template(500, ex)
end end
templated "community" templated "channel/community"
end end
def channels(env) 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! featured_channel_categories = fetch_channel_featured_channels(ucid, channel.tabs["channels"], nil, nil).not_nil!
end end
templated "channels" templated "channel/featured_channels"
end end
def featured_channel_category(env) def featured_channel_category(env)
@ -151,7 +151,7 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute
title = env.params.query["title"]? title = env.params.query["title"]?
featured_channel_categories = fetch_channel_featured_channels(ucid, channel.tabs["channels"], category_param, continuation, title).not_nil! featured_channel_categories = fetch_channel_featured_channels(ucid, channel.tabs["channels"], category_param, continuation, title).not_nil!
templated "channels" templated "channel/featured_channels"
end end
def about(env) def about(env)
@ -161,7 +161,7 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute
end end
locale, user, subscriptions, continuation, ucid, channel = data locale, user, subscriptions, continuation, ucid, channel = data
templated "channel_about" templated "channel/about"
end end
private def fetch_basic_information(env) private def fetch_basic_information(env)