mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-02 11:36:27 -04:00
Handle unsupported "special" categories
This commit is contained in:
parent
57754d69e1
commit
33f5d161f8
1 changed files with 10 additions and 4 deletions
|
@ -307,11 +307,17 @@ private module Parsers
|
||||||
# Content parsing
|
# Content parsing
|
||||||
contents = [] of SearchItem
|
contents = [] of SearchItem
|
||||||
|
|
||||||
# Content could be in three locations.
|
# InnerTube recognizes some "special" categories, which are organized differently.
|
||||||
if content_container = item_contents["content"]["horizontalListRenderer"]?
|
if special_category_container = item_contents["content"]?
|
||||||
elsif content_container = item_contents["content"]["expandedShelfContentsRenderer"]?
|
if content_container = special_category_container["horizontalListRenderer"]?
|
||||||
elsif content_container = item_contents["content"]["verticalListRenderer"]?
|
elsif content_container = special_category_container["expandedShelfContentsRenderer"]?
|
||||||
|
elsif content_container = special_category_container["verticalListRenderer"]?
|
||||||
else
|
else
|
||||||
|
# Anything else, such as `horizontalMovieListRenderer` is currently unsupported.
|
||||||
|
return
|
||||||
|
end
|
||||||
|
else
|
||||||
|
# "Normal" category.
|
||||||
content_container = item_contents["contents"]
|
content_container = item_contents["contents"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue