Fix pro/amp video parsing

This commit is contained in:
Zed 2019-09-17 21:17:03 +02:00
parent da0ad25c2c
commit 12695b393e
1 changed files with 1 additions and 1 deletions

View File

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