Channel: Render age restricted channels

This commit is contained in:
ChunkyProgrammer
2023-11-26 20:24:04 -05:00
parent e319c35f09
commit 96ade642fa
4 changed files with 221 additions and 119 deletions

View File

@@ -46,8 +46,14 @@ struct PlaylistVideo
XML.build { |xml| to_xml(xml) }
end
def to_json(locale : String?, json : JSON::Builder)
to_json(json)
end
def to_json(json : JSON::Builder, index : Int32? = nil)
json.object do
json.field "type", "video"
json.field "title", self.title
json.field "videoId", self.id
@@ -67,6 +73,7 @@ struct PlaylistVideo
end
json.field "lengthSeconds", self.length_seconds
json.field "liveNow", self.live_now
end
end