diff --git a/config/default.js b/config/default.js index a26aaff5..5d16b626 100644 --- a/config/default.js +++ b/config/default.js @@ -44,7 +44,7 @@ module.exports = { path: './media', thumbnailSize: 320, // width for 16:9 will be exactly 576px thumbnailQuality: 100, - trailerQuality: 480, + trailerQuality: [480, 540], limit: 25, // max number of photos per release }, }; diff --git a/src/media.js b/src/media.js index c7299eca..f962abfd 100644 --- a/src/media.js +++ b/src/media.js @@ -290,9 +290,11 @@ async function storeTrailer(trailers, { }, label) { // support scrapers supplying multiple qualities const trailer = Array.isArray(trailers) - ? trailers.find(trailerX => [config.media.trailerQuality, 480, 720, 1080].includes(trailerX.quality)) || trailers[0] + ? trailers.find(trailerX => config.media.trailerQuality.includes(trailerX.quality)) || trailers[0] : trailers; + console.log(trailer); + if (!trailer || !trailer.src) { logger.info(`No trailer available for ${label}`); return;