module Invidious::Frontend::ChannelPage extend self enum TabsAvailable Videos Shorts Streams Playlists Community Channels end def generate_tabs_links(locale : String, channel : AboutChannel, selected_tab : TabsAvailable) return String.build(1500) do |str| base_url = "/channel/#{channel.ucid}" TabsAvailable.each do |tab| # Ignore playlists, as it is not supported for auto-generated channels yet next if (tab.playlists? && channel.auto_generated) tab_name = tab.to_s.downcase if channel.tabs.includes? tab_name str << %(