diff --git a/src/invidious/channels/about.cr b/src/invidious/channels/about.cr index 8a03c419..70c05837 100644 --- a/src/invidious/channels/about.cr +++ b/src/invidious/channels/about.cr @@ -139,8 +139,9 @@ def get_about_info(ucid, locale) : AboutChannel # For auto-generated channels, channel_about_meta only has # ["description"]["simpleText"] and ["primaryLinks"][0]["title"]["simpleText"] auto_generated = ( - (channel_about_meta["primaryLinks"]?.try &.size) == 1 && \ - extract_text(channel_about_meta.dig?("primaryLinks", 0, "title")) == "Auto-generated by YouTube" + ((channel_about_meta["primaryLinks"]?.try &.size) == 1 && \ + extract_text(channel_about_meta.dig?("primaryLinks", 0, "title")) == "Auto-generated by YouTube") || + channel_about_meta.dig?("links", 0, "channelExternalLinkViewModel", "title", "content").try &.as_s == "Auto-generated by YouTube" ) end end diff --git a/src/invidious/routes/channels.cr b/src/invidious/routes/channels.cr index d006985e..c808d983 100644 --- a/src/invidious/routes/channels.cr +++ b/src/invidious/routes/channels.cr @@ -20,21 +20,7 @@ module Invidious::Routes::Channels sort_by = env.params.query["sort_by"]?.try &.downcase if channel.auto_generated - sort_options = {"last", "oldest", "newest"} - - items, next_continuation = fetch_channel_playlists( - channel.ucid, channel.author, continuation, (sort_by || "last") - ) - - items.uniq! do |item| - if item.responds_to?(:title) - item.title - elsif item.responds_to?(:author) - item.author - end - end - items = items.select(SearchPlaylist) - items.each(&.author = "") + return env.redirect "/channel/#{ucid}/playlists" else sort_options = {"newest", "oldest", "popular"}