diff options
| author | Omar Roth <omarroth@protonmail.com> | 2020-07-21 20:11:13 -0400 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2020-07-21 20:11:13 -0400 |
| commit | b5f79444f9c32dcd090c06e3bf48c1c0bb63bb22 (patch) | |
| tree | d33b1911b02ed36f95e199e5bf8b5d165c767ffb /src | |
| parent | b73c6e94c02e46d953ea5dbab3f45d84813f2b73 (diff) | |
| download | invidious-b5f79444f9c32dcd090c06e3bf48c1c0bb63bb22.tar.gz invidious-b5f79444f9c32dcd090c06e3bf48c1c0bb63bb22.tar.bz2 invidious-b5f79444f9c32dcd090c06e3bf48c1c0bb63bb22.zip | |
Fix optional value in data extractor
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/helpers/helpers.cr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr index ca7c9ebc..cb4aec9b 100644 --- a/src/invidious/helpers/helpers.cr +++ b/src/invidious/helpers/helpers.cr @@ -326,7 +326,7 @@ def extract_items(initial_data : Hash(String, JSON::Any), author_fallback : Stri t["continuationContents"]? } .try { |t| t["sectionListRenderer"]? || t["sectionListContinuation"]? } .try &.["contents"].as_a - .each { |c| c.try &.["itemSectionRenderer"]["contents"].as_a + .each { |c| c.try &.["itemSectionRenderer"]?.try &.["contents"].as_a .try { |t| t[0]?.try &.["shelfRenderer"]?.try &.["content"]["expandedShelfContentsRenderer"]?.try &.["items"].as_a || t[0]?.try &.["gridRenderer"]?.try &.["items"].as_a || t } .each { |item| |
