mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-22 13:37:24 +00:00
Add description_html field to Category
(cherry picked from commit aa8f15f795
)
This commit is contained in:
parent
ea6434662d
commit
7b60dac526
@ -256,6 +256,9 @@ private class CategoryParser < ItemParser
|
|||||||
badges << {badge["style"].as_s, badge["label"].as_s}
|
badges << {badge["style"].as_s, badge["label"].as_s}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Category description
|
||||||
|
description_html = item_contents["subtitle"]?.try { |desc| parse_content(desc) } || ""
|
||||||
|
|
||||||
# Content parsing
|
# Content parsing
|
||||||
contents = [] of SearchItem
|
contents = [] of SearchItem
|
||||||
|
|
||||||
@ -278,6 +281,7 @@ private class CategoryParser < ItemParser
|
|||||||
Category.new({
|
Category.new({
|
||||||
title: title,
|
title: title,
|
||||||
contents: contents,
|
contents: contents,
|
||||||
|
description_html: description_html,
|
||||||
browse_endpoint_data: browse_endpoint_data,
|
browse_endpoint_data: browse_endpoint_data,
|
||||||
badges: badges,
|
badges: badges,
|
||||||
})
|
})
|
||||||
|
@ -232,6 +232,7 @@ class Category
|
|||||||
property title : String
|
property title : String
|
||||||
property contents : Array(SearchItem)
|
property contents : Array(SearchItem)
|
||||||
property browse_endpoint_data : String?
|
property browse_endpoint_data : String?
|
||||||
|
property description_html : String
|
||||||
property badges : Array(Tuple(String, String))?
|
property badges : Array(Tuple(String, String))?
|
||||||
|
|
||||||
def to_json(locale, json : JSON::Builder)
|
def to_json(locale, json : JSON::Builder)
|
||||||
|
Loading…
Reference in New Issue
Block a user