@using InnerTube.Models @using System.Web @model LightTube.Contexts.ChannelContext @{ ViewBag.Metadata = new Dictionary(); ViewBag.Metadata["og:title"] = Model.Channel.Name; ViewBag.Metadata["og:url"] = $"{Url.ActionContext.HttpContext.Request.Scheme}://{Url.ActionContext.HttpContext.Request.Host}{Url.ActionContext.HttpContext.Request.Path}{Url.ActionContext.HttpContext.Request.QueryString}"; ViewBag.Metadata["og:image"] = $"{Url.ActionContext.HttpContext.Request.Scheme}://{Url.ActionContext.HttpContext.Request.Host}/proxy/image?url={HttpUtility.UrlEncode(Model.Channel.Avatars.FirstOrDefault()?.Url?.ToString())}"; ViewBag.Metadata["twitter:card"] = $"{Url.ActionContext.HttpContext.Request.Scheme}://{Url.ActionContext.HttpContext.Request.Host}/proxy/image?url={HttpUtility.UrlEncode(Model.Channel.Avatars.LastOrDefault()?.Url?.ToString())}"; ViewBag.Metadata["og:description"] = Model.Channel.Description; ViewBag.Title = Model.Channel.Name; Layout = "_Layout"; DynamicItem[] contents; try { contents = ((ItemSectionItem)((ItemSectionItem)Model.Channel.Videos[0]).Contents[0]).Contents; } catch { contents = Model.Channel.Videos; } }
@if (Model.Channel.Banners.Length > 0) { Channel Banner }
Channel Avatar
@Model.Channel.Name @Model.Channel.Subscribers

About

@Html.Raw(Model.Channel.GetHtmlDescription())



Uploads

@foreach (VideoItem video in contents.Where(x => x is VideoItem).Cast()) {
@video.Duration
@video.Title
@video.Views views @video.UploadedAt
}
@if (!string.IsNullOrWhiteSpace(Model.ContinuationToken)) { First Page }
@if (!string.IsNullOrWhiteSpace(contents.FirstOrDefault(x => x is ContinuationItem)?.Id)) { Next Page }