Parse alternative video title
This commit is contained in:
parent
179b3bc496
commit
1811a23265
|
@ -115,6 +115,9 @@ proc parseVideo(js: JsonNode): Video =
|
||||||
durationMs: js{"duration_millis"}.getInt
|
durationMs: js{"duration_millis"}.getInt
|
||||||
)
|
)
|
||||||
|
|
||||||
|
with title, js{"additional_media_info", "title"}:
|
||||||
|
result.title = title.getStr
|
||||||
|
|
||||||
for v in js{"video_info", "variants"}:
|
for v in js{"video_info", "variants"}:
|
||||||
result.variants.add VideoVariant(
|
result.variants.add VideoVariant(
|
||||||
videoType: parseEnum[VideoType](v{"content_type"}.getStr("summary")),
|
videoType: parseEnum[VideoType](v{"content_type"}.getStr("summary")),
|
||||||
|
|
Loading…
Reference in New Issue