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) { %>
- <% if (j.Channel.Metadata.Banners.Thumbnail) { %> + <% if (j.Channel?.Metadata.Banners.Thumbnail) { %> - + <% } %> @@ -786,10 +796,10 @@ align-content: center; margin: auto; width: fit-content; "> - Channel Avatar + Channel Avatar
-

<%=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;" >

- <% if (shorts.continuation) { %> + <% if (shorts?.continuation) { %>
Next Page
@@ -1146,9 +1156,9 @@ margin-left: 8em;" >
- <% if (stream.continuation) { %> + <% if (stream?.continuation) { %>
- Next Page + Next Page
<% } %> @@ -1158,23 +1168,23 @@ margin-left: 8em;" > <% if (tab === "community") { %> - <% if (Array.isArray( c.comments)) { %> + <% if (Array?.isArray( c?.comments)) { %>
- <% c.comments.forEach (x => { %> + <% c?.comments?.forEach (x => { %>

- <%=j.Channel.Metadata.Name%> + <%=j.Channel?.Metadata.Name%> @@ -1337,3 +1347,5 @@ urls.forEach(link => { +<% } catch (error) { %> + <% } %> \ No newline at end of file