Add description_html field to Category

(cherry picked from commit aa8f15f795787113e56473f8e8fd606749a14bdd)
このコミットが含まれているのは:
syeopite 2021-05-08 20:07:07 -07:00
コミット 7b60dac526
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 6FA616E5A5294A82
2個のファイルの変更5行の追加0行の削除

ファイルの表示

@ -256,6 +256,9 @@ private class CategoryParser < ItemParser
badges << {badge["style"].as_s, badge["label"].as_s}
end
# Category description
description_html = item_contents["subtitle"]?.try { |desc| parse_content(desc) } || ""
# Content parsing
contents = [] of SearchItem
@ -278,6 +281,7 @@ private class CategoryParser < ItemParser
Category.new({
title: title,
contents: contents,
description_html: description_html,
browse_endpoint_data: browse_endpoint_data,
badges: badges,
})

ファイルの表示

@ -232,6 +232,7 @@ class Category
property title : String
property contents : Array(SearchItem)
property browse_endpoint_data : String?
property description_html : String
property badges : Array(Tuple(String, String))?
def to_json(locale, json : JSON::Builder)