From 3b1a2862907ed5a567db9aad6180cad730f590ac Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Wed, 8 Dec 2021 01:38:09 +0100 Subject: [PATCH] Use dig?() for playlist title --- src/invidious/playlists.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr index fc41ecd2..1a8c2adc 100644 --- a/src/invidious/playlists.cr +++ b/src/invidious/playlists.cr @@ -352,7 +352,7 @@ def fetch_playlist(plid, locale) playlist_info = playlist_sidebar_renderer[0]["playlistSidebarPrimaryInfoRenderer"]? raise InfoException.new("Could not extract playlist info") if !playlist_info - title = playlist_info["title"]?.try &.["runs"][0]?.try &.["text"]?.try &.as_s || "" + title = playlist_info.dig?("title", "runs", 0, "text").try &.as_s || "" desc_item = playlist_info["description"]?