|
|
@ -231,11 +231,16 @@ def process_search_query(url_params, query, page, user, region)
|
|
|
|
count, items = search(search_query, search_params, region).as(Tuple)
|
|
|
|
count, items = search(search_query, search_params, region).as(Tuple)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
# Light processing to ignore extracted items from categories for now.
|
|
|
|
# Light processing to flatten search results out of Categories.
|
|
|
|
# They should ideally be supported in the frontend in the future
|
|
|
|
# They should ideally be supported in the future.
|
|
|
|
items_without_cate_items = [] of SearchItem | ChannelVideo
|
|
|
|
items_without_cate_items = [] of SearchItem | ChannelVideo
|
|
|
|
items.each do |i|
|
|
|
|
items.each do |i|
|
|
|
|
if i.is_a? Category
|
|
|
|
if i.is_a? Category
|
|
|
|
|
|
|
|
i.contents.each do |nest_i|
|
|
|
|
|
|
|
|
if !nest_i.is_a? Video
|
|
|
|
|
|
|
|
items_without_cate_items << nest_i
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
else
|
|
|
|
else
|
|
|
|
items_without_cate_items << i
|
|
|
|
items_without_cate_items << i
|
|
|
|
end
|
|
|
|
end
|
|
|
|