|
@@ -127,14 +127,12 @@ proc parseVideo*(node: JsonNode): Video =
|
|
|
durationMs: track["durationMs"].to(int),
|
|
durationMs: track["durationMs"].to(int),
|
|
|
views: track["viewCount"].to(string),
|
|
views: track["viewCount"].to(string),
|
|
|
url: track["playbackUrl"].to(string),
|
|
url: track["playbackUrl"].to(string),
|
|
|
- available: track{"mediaAvailability"}["status"].to(string) == "available"
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ available: track{"mediaAvailability"}["status"].to(string) == "available")
|
|
|
of "vmap":
|
|
of "vmap":
|
|
|
result = Video(
|
|
result = Video(
|
|
|
playbackType: vmap,
|
|
playbackType: vmap,
|
|
|
durationMs: track["durationMs"].to(int),
|
|
durationMs: track["durationMs"].to(int),
|
|
|
- url: track["vmapUrl"].to(string)
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ url: track["vmapUrl"].to(string))
|
|
|
else:
|
|
else:
|
|
|
echo "Can't parse video of type ", cType
|
|
echo "Can't parse video of type ", cType
|
|
|
|
|
|