このコミットが含まれているのは:
2026-07-18 14:55:11 +09:00
コミット a5ae7c6f2d
14個のファイルの変更513行の追加39行の削除
+10
ファイルの表示
@@ -27,6 +27,7 @@ class PostCreatePlan
original_created_from: @attributes[:original_created_from].presence,
original_created_before: @attributes[:original_created_before].presence,
tags: serialised_tags(direct_tag_specs, tag_sections),
display_tags: display_tags(direct_tag_specs, tag_sections),
duration: @attributes[:duration].to_s,
video_ms: video_ms,
parent_post_ids: parent_post_ids.join(' '),
@@ -204,6 +205,15 @@ class PostCreatePlan
}.sort.join(' ')
end
def display_tags direct_tag_specs, tag_sections
direct_tag_specs.map { |spec|
{
name: spec[:name],
category: spec[:category].to_s,
section_literals: tag_sections[spec[:name]].to_a.map { Post.section_literal(_1) } }
}.sort_by { _1[:name] }
end
def normalise_video_ms snapshot_tag_specs
return nil unless snapshot_tag_specs.any? { _1[:name] == VIDEO_TAG_NAME }