mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Merge pull request #2506 from syeopite/handle-empty-playlist-tabs
Handle YT tabs without content
This commit is contained in:
commit
21b96a3159
1 changed files with 8 additions and 6 deletions
|
@ -321,11 +321,13 @@ private module Parsers
|
||||||
content_container = item_contents["contents"]
|
content_container = item_contents["contents"]
|
||||||
end
|
end
|
||||||
|
|
||||||
raw_contents = content_container["items"].as_a
|
raw_contents = content_container["items"]?.try &.as_a
|
||||||
raw_contents.each do |item|
|
if !raw_contents.nil?
|
||||||
result = extract_item(item)
|
raw_contents.each do |item|
|
||||||
if !result.nil?
|
result = extract_item(item)
|
||||||
contents << result
|
if !result.nil?
|
||||||
|
contents << result
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -399,7 +401,7 @@ private module Extractors
|
||||||
items_container = renderer_container_contents
|
items_container = renderer_container_contents
|
||||||
end
|
end
|
||||||
|
|
||||||
items_container["items"].as_a.each do |item|
|
items_container["items"]?.try &.as_a.each do |item|
|
||||||
raw_items << item
|
raw_items << item
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue