From 7b2b2bc45f28d6a83ba3886516b2447ec5036477 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 8 Apr 2020 13:43:29 -0400 Subject: [PATCH] Revert "fix: image previews on links without thumbnails" This reverts commit a5584890fd57696fd5126e8b778abe801da455b1. --- lbrytv/src/html.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/lbrytv/src/html.js b/lbrytv/src/html.js index 76987d19d..febd9c5ef 100644 --- a/lbrytv/src/html.js +++ b/lbrytv/src/html.js @@ -1,5 +1,5 @@ const { URL } = require('../../config.js'); -const { generateEmbedUrl, generateStreamUrl } = require('../../ui/util/lbrytv'); +const { generateEmbedUrl } = require('../../ui/util/lbrytv'); const PAGES = require('../../ui/constants/pages'); const { getClaim } = require('./chainquery'); const { parseURI } = require('lbry-redux'); @@ -61,16 +61,9 @@ function buildClaimOgMetadata(uri, claim, overrideOptions = {}) { const claimDescription = claim.description && claim.description.length > 0 ? escapeHtmlProperty(truncateDescription(claim.description)) - : `View ${claimTitle} on lbry.tv`; + : `Watch ${claimTitle} on LBRY.tv`; const claimLanguage = escapeHtmlProperty(claim.language) || 'en_US'; - const isImage = claim && claim.value && claim.value.stream_type === 'image'; - const isFree = claim && claim.value && (!claim.value.fee || Number(claim.value.fee.amount) <= 0); - let imageThumbnail; - - if (claim && isImage && isFree) { - imageThumbnail = generateStreamUrl(claimName, claim.claim_id); - } - const claimThumbnail = escapeHtmlProperty(claim.thumbnail_url) || imageThumbnail || `${URL}/v1-og.png`; + const claimThumbnail = escapeHtmlProperty(claim.thumbnail_url) || `${URL}/v1-og.png`; // Allow for ovverriding default claim based og metadata const title = overrideOptions.title || claimTitle; @@ -89,7 +82,7 @@ function buildClaimOgMetadata(uri, claim, overrideOptions = {}) { head += ``; head += ``; head += ``; - head += ``; + head += ``; head += ``; head += ``; // below should be canonical_url, but not provided by chainquery yet