func Pages.ChannelInfo(tytd,ctx)
{
    var id = ctx.QueryParams.TryGetFirst("id");
    var page = ctx.QueryParams.TryGetFirstInt("page");
    if(TypeOf(page) != "Long") page = 1;
    page--;
    
    var html = <h1>Could not find channel</h1>;
    var title = "N/A";

    if(TypeOf(id) == "String")
    {
        id = TYTD.GetChannelId(id);
        var res = tytd.GetChannelContents(id,page,20);

        html = <null>
            <div class="row">
                <div class="max">
                    <h1>{res.authorName}</h1>
                </div>
                <div class="min">
                    <raw(Components.Subscribe(tytd,id))>
                </div>
            </div>
            <each(var item : res.items)>
                <raw(Components.DownloadedVideo(item))>
            </each>
            <footer class="row center-align">
           
                <button hx-get={$"./channel?id={Net.Http.UrlEncode(id)}&page={page}"} hx-target="body" hx-push-url="true" >Prev</button>{page+1}<button hx-get={$"./channel?id={Net.Http.UrlEncode(id)}&type=videos&page={page+2}"} hx-target="body" hx-push-url="true" >Next</button>
            
            </footer>
        </null>;

        title = res.authorName;
    }

    return Components.Shell($"Channel {title}",html,1);
}