Parse alternative video title

This commit is contained in:
Zed 2020-06-10 17:09:38 +02:00
parent 179b3bc496
commit 1811a23265
1 changed files with 3 additions and 0 deletions

View File

@ -115,6 +115,9 @@ proc parseVideo(js: JsonNode): Video =
durationMs: js{"duration_millis"}.getInt
)
with title, js{"additional_media_info", "title"}:
result.title = title.getStr
for v in js{"video_info", "variants"}:
result.variants.add VideoVariant(
videoType: parseEnum[VideoType](v{"content_type"}.getStr("summary")),