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")
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),
views: track["viewCount"].to(string),
url: track["playbackUrl"].to(string),
available: track{"mediaAvailability"}["status"].to(string) == "available"
)
available: track{"mediaAvailability"}["status"].to(string) == "available")
of "vmap":
result = Video(
playbackType: vmap,
durationMs: track["durationMs"].to(int),
url: track["vmapUrl"].to(string)
)
url: track["vmapUrl"].to(string))
else:
echo "Can't parse video of type ", cType