Fix pro/amp video parsing

This commit is contained in:
Zed 2019-09-17 21:17:03 +02:00
parent da0ad25c2c
commit 12695b393e

View file

@ -185,7 +185,7 @@ proc parseVideo*(node: JsonNode; tweetId: string): Video =
of "vmap": of "vmap":
result = Video( result = Video(
playbackType: vmap, playbackType: vmap,
durationMs: track["durationMs"].to(int), durationMs: track.getOrDefault("durationMs").getInt(0),
url: track["vmapUrl"].to(string), url: track["vmapUrl"].to(string),
available: true) available: true)
else: else: