diff --git a/html/channel.ejs b/html/channel.ejs index 82c9a18e..b7ad6438 100644 --- a/html/channel.ejs +++ b/html/channel.ejs @@ -1,4 +1,6 @@ - +
Error: <%= error.message %>
+<% } %> + + @@ -650,9 +660,9 @@ white-space: nowrap;text-decoration: none;" href="/feeds/videos.xml?channel_id=< <% } %> - <% if (Array.isArray(stream.videos)) { %> -<% if (stream.videos[0]) { %> -<% if (turntomins(stream.videos[0].lengthSeconds) != "aN:aN" ) { %> + <% if (Array?.isArray(stream?.videos)) { %> +<% if (stream?.videos[0]) { %> +<% if (turntomins(stream?.videos[0]?.lengthSeconds) != "aN:aN" ) { %> Live @@ -660,9 +670,9 @@ white-space: nowrap;text-decoration: none;" href="/feeds/videos.xml?channel_id=< <% } %> <% } %> - <% if (Array.isArray(c.comments)) { %> + <% if (Array?.isArray(c?.comments)) { %> - <% if (c.comments.length != "0") { %> + <% if (c?.comments?.length != "0") { %> Community <% } %> @@ -675,17 +685,17 @@ white-space: nowrap;text-decoration: none;" href="/feeds/videos.xml?channel_id=< <% if (tab === "community") { %> Videos - <% if (Array.isArray(shorts.videos)) { %> -<% if (turntomins(shorts.videos[0].lengthSeconds) != "aN:aN" ) { %> + <% if (Array?.isArray(shorts?.videos)) { %> +<% if (turntomins(shorts?.videos[0]?.lengthSeconds) != "aN:aN" ) { %> Shorts <% } %> <% } %> - <% if (Array.isArray(stream.videos)) { %> - <% if (stream.videos[0]) { %> + <% if (Array?.isArray(stream?.videos)) { %> + <% if (stream?.videos[0]) { %> -<% if (turntomins(stream.videos[0].lengthSeconds) != "aN:aN" ) { %> +<% if (turntomins(stream?.videos[0]?.lengthSeconds) != "aN:aN" ) { %> Live <% } %> @@ -701,13 +711,13 @@ white-space: nowrap;text-decoration: none;" href="/feeds/videos.xml?channel_id=< <% if (tab === "shorts") { %> Videos -<% if (Array.isArray(shorts?.videos)) { %> +<% if (Array?.isArray(shorts?.videos)) { %> Shorts <% } %> - <% if (Array.isArray(stream?.videos)) { %> - <% if (stream.videos[0]) { %> -<% if (turntomins(stream.videos[0].lengthSeconds) != "aN:aN" ) { %> + <% if (Array?.isArray(stream?.videos)) { %> + <% if (stream?.videos[0]) { %> +<% if (turntomins(stream?.videos[0]?.lengthSeconds) != "aN:aN" ) { %> Live <% } %> @@ -715,9 +725,9 @@ white-space: nowrap;text-decoration: none;" href="/feeds/videos.xml?channel_id=< <% } %> - <% if (Array.isArray(c.comments)) { %> + <% if (Array?.isArray(c?.comments)) { %> - <% if (c.comments.length != "0") { %> + <% if (c?.comments?.length != "0") { %> Community <% } %> @@ -729,22 +739,22 @@ white-space: nowrap;text-decoration: none;" href="/feeds/videos.xml?channel_id=< <% if (tab === "live") { %> Videos -<% if (Array.isArray(shorts?.videos)) { %> +<% if (Array?.isArray(shorts?.videos)) { %> -<% if (turntomins(shorts.videos[0].lengthSeconds) != "aN:aN" ) { %> +<% if (turntomins(shorts?.videos[0]?.lengthSeconds) != "aN:aN" ) { %> Shorts <% } %> <% } %> - <% if (Array.isArray(stream?.videos)) { %> + <% if (Array?.isArray(stream?.videos)) { %> Live <% } %> - <% if (Array.isArray(c.comments)) { %> + <% if (Array?.isArray(c?.comments)) { %> - <% if (c.comments.length != "0") { %> + <% if (c?.comments?.length != "0") { %> Community <% } %> @@ -764,9 +774,9 @@ white-space: nowrap;text-decoration: none;" href="/feeds/videos.xml?channel_id=< <% if (isMobile) { %><%=j.Channel.Metadata.Name%>
+<%=j.Channel?.Metadata.Name%>
<%=subs%> subscribers @@ -1050,7 +1060,7 @@ width: fit-content; margin-left: 8em;" > - <% if (Array.isArray( shorts.videos)) { %> + <% if (Array?.isArray( shorts.videos)) { %> <% shorts.videos.forEach (x => { %> @@ -1072,7 +1082,7 @@ margin-left: 8em;" >