Better video/gif support

This commit is contained in:
Zed
2019-06-24 05:14:14 +02:00
parent 8f7c61eab6
commit 861ac7a593
7 changed files with 151 additions and 39 deletions

View File

@@ -65,12 +65,6 @@ proc getUserpic*(userpic: string; style=""): string =
proc getUserpic*(profile: Profile; style=""): string =
getUserPic(profile.userpic, style)
proc getGifSrc*(tweet: Tweet): string =
fmt"https://video.twimg.com/tweet_video/{tweet.gif.get()}.mp4"
proc getGifThumb*(tweet: Tweet): string =
fmt"https://pbs.twimg.com/tweet_video_thumb/{tweet.gif.get()}.jpg"
proc formatName*(profile: Profile): string =
result = xmltree.escape(profile.fullname)
if profile.verified: