From 6d29e9c1b7d726a38d9355835138abb19c4838ef Mon Sep 17 00:00:00 2001 From: Johnquai <74146236+Johnquai@users.noreply.github.com> Date: Thu, 12 Nov 2020 10:35:12 -0500 Subject: [PATCH] Fix missing videos tab on some channels (#1462) * Fix missing videos tab on some channels * Fixed formatting Co-authored-by: Linux User --- src/invidious/channels.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/invidious/channels.cr b/src/invidious/channels.cr index dce9e6aa..656b9953 100644 --- a/src/invidious/channels.cr +++ b/src/invidious/channels.cr @@ -887,8 +887,8 @@ def get_about_info(ucid, locale) # Auto-generated channels # https://support.google.com/youtube/answer/2579942 # For auto-generated channels, channel_about_meta only has ["description"]["simpleText"] and ["primaryLinks"][0]["title"]["simpleText"] - if (channel_about_meta["primaryLinks"]?.try &.size || 0) == 1 && (channel_about_meta["primaryLinks"][0]?) - (channel_about_meta["primaryLinks"][0]["title"]?.try &.["simpleText"]?.try &.as_s? || "") == "Auto-generated by YouTube" + if (channel_about_meta["primaryLinks"]?.try &.size || 0) == 1 && (channel_about_meta["primaryLinks"][0]?) && + (channel_about_meta["primaryLinks"][0]["title"]?.try &.["simpleText"]?.try &.as_s? || "") == "Auto-generated by YouTube" auto_generated = true end end