Fix getLink typo

This commit is contained in:
Zed 2019-07-01 23:55:19 +02:00
parent 7ef10b88f4
commit 97166feec9
2 changed files with 3 additions and 5 deletions

View file

@ -96,4 +96,4 @@ proc getTime*(tweet: Tweet): string =
tweet.time.format("d/M/yyyy', ' HH:mm:ss") tweet.time.format("d/M/yyyy', ' HH:mm:ss")
proc getLink*(tweet: Tweet | Quote): string = proc getLink*(tweet: Tweet | Quote): string =
&"{tweet.profile.username}/status/{tweet.id}" &"/{tweet.profile.username}/status/{tweet.id}"

View file

@ -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