mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-16 01:28:29 +00:00
Fix for #2488 - parse contents of search results of type=Category (returned on first page for universal (type=all) queries instead of returning an error.
This commit is contained in:
parent
39c27f0c66
commit
d37b69fb20
@ -36,7 +36,13 @@ module Invidious::Routes::API::V1::Search
|
||||
JSON.build do |json|
|
||||
json.array do
|
||||
search_results.each do |item|
|
||||
item.to_json(locale, json)
|
||||
if item.is_a?(Category)
|
||||
item.contents.each do |cat_item|
|
||||
cat_item.to_json(locale, json)
|
||||
end
|
||||
else
|
||||
item.to_json(locale, json)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user