From 372ff542617af468489d4941e9b71aba60c4ff38 Mon Sep 17 00:00:00 2001 From: Niels Simenon Date: Wed, 19 Feb 2020 04:47:20 +0100 Subject: [PATCH] Added teaser source to Gamma scraper. Not adding Gamma teaser for upcoming releases. --- src/scrapers/gamma.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/scrapers/gamma.js b/src/scrapers/gamma.js index 0fad7c62..ba0004f4 100644 --- a/src/scrapers/gamma.js +++ b/src/scrapers/gamma.js @@ -173,11 +173,11 @@ function scrapeAll(html, site, networkUrl, hasTeaser = true) { const posterEl = $(element).find('.imgLink img, .tlcImageItem'); if (posterEl) release.poster = posterEl.attr('data-original') || posterEl.attr('src'); - if (hasTeaser) { - release.teaser = { - src: `https://videothumb.gammacdn.com/307x224/${release.entryId}.mp4`, - quality: 224, - }; + if (hasTeaser && release.date && new Date() - release.date > 0) { + release.teaser = [ + { src: `https://videothumb.gammacdn.com/600x339/${release.entryId}.mp4` }, + { src: `https://videothumb.gammacdn.com/307x224/${release.entryId}.mp4` }, + ]; } return release;