Browse Source
Merge pull request #2506 from syeopite/handle-empty-playlist-tabs
Handle YT tabs without content
pull/2522/head
syeopite
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
6 deletions
-
src/invidious/helpers/extractors.cr
|
|
|
@ -321,11 +321,13 @@ private module Parsers |
|
|
|
content_container = item_contents["contents"] |
|
|
|
end |
|
|
|
|
|
|
|
raw_contents = content_container["items"].as_a |
|
|
|
raw_contents.each do |item| |
|
|
|
result = extract_item(item) |
|
|
|
if !result.nil? |
|
|
|
contents << result |
|
|
|
raw_contents = content_container["items"]?.try &.as_a |
|
|
|
if !raw_contents.nil? |
|
|
|
raw_contents.each do |item| |
|
|
|
result = extract_item(item) |
|
|
|
if !result.nil? |
|
|
|
contents << result |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
@ -399,7 +401,7 @@ private module Extractors |
|
|
|
items_container = renderer_container_contents |
|
|
|
end |
|
|
|
|
|
|
|
items_container["items"].as_a.each do |item| |
|
|
|
items_container["items"]?.try &.as_a.each do |item| |
|
|
|
raw_items << item |
|
|
|
end |
|
|
|
end |
|
|
|
|