From d38309c345e2619bdfcc618d723d742fd7d5e655 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 12 Jul 2017 12:19:39 +0200 Subject: Set correctly preview image for open graph --- server/controllers/client.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'server') diff --git a/server/controllers/client.ts b/server/controllers/client.ts index d913f81b8..1324e62cd 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts @@ -45,18 +45,7 @@ export { // --------------------------------------------------------------------------- function addOpenGraphTags (htmlStringPage: string, video: VideoInstance) { - let basePreviewUrlHttp - - if (video.isOwned()) { - basePreviewUrlHttp = CONFIG.WEBSERVER.URL - } else { - basePreviewUrlHttp = REMOTE_SCHEME.HTTP + '://' + video.Author.Pod.host - } - - // We fetch the remote preview (bigger than the thumbnail) - // This should not overhead the remote server since social websites put in a cache the OpenGraph tags - // We can't use the thumbnail because these social websites want bigger images (> 200x200 for Facebook for example) - const previewUrl = basePreviewUrlHttp + STATIC_PATHS.PREVIEWS + video.getPreviewName() + const previewUrl = CONFIG.WEBSERVER.URL + STATIC_PATHS.PREVIEWS + video.getPreviewName() const videoUrl = CONFIG.WEBSERVER.URL + '/videos/watch/' + video.id const metaTags = { -- cgit v1.2.3