Fix pro/amp video parsing
This commit is contained in:
parent
da0ad25c2c
commit
12695b393e
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue