diff --git a/build/lib/tweetparse.js b/build/lib/tweetparse.js index 760acce..05b3c38 100644 --- a/build/lib/tweetparse.js +++ b/build/lib/tweetparse.js @@ -129,6 +129,22 @@ module.exports = exports = function (tweets) { media.media_url_https = '/' + mediaItem.output; } + if (media.video_info && media.video_info.variants) { + media.video_info.variants = media.video_info.variants.map((variant) => { + if (!variant.url) return variant; + + const mediaItem = { + input: variant.url, + output: `tweets/${tweet.id_str}/${path.basename(variant.url)}`, + cache: `twitter-entities/${tweet.id_str}/${path.basename(variant.url)}`, + }; + tweet.media.push(mediaItem); + variant.url = '/' + mediaItem.output; + + return variant; + }); + } + return media; }); diff --git a/scss/_tweet.scss b/scss/_tweet.scss index b9bb080..6a5b583 100644 --- a/scss/_tweet.scss +++ b/scss/_tweet.scss @@ -272,7 +272,9 @@ } .tweet-footer { - display: block; + display: flex; + flex: 1 1 auto; + align-items: flex-end; color: $textLight; font-size: 1em; margin-top: 10px; diff --git a/templates/tweet.hbs b/templates/tweet.hbs index 04d4eb1..6166884 100644 --- a/templates/tweet.hbs +++ b/templates/tweet.hbs @@ -52,7 +52,7 @@ {{/is}} {{#is type 'animated_gif'}} -