Moved all preferred resolutions to config.
This commit is contained in:
parent
d9623789bd
commit
0b4a1a5232
|
@ -44,7 +44,7 @@ module.exports = {
|
||||||
path: './media',
|
path: './media',
|
||||||
thumbnailSize: 320, // width for 16:9 will be exactly 576px
|
thumbnailSize: 320, // width for 16:9 will be exactly 576px
|
||||||
thumbnailQuality: 100,
|
thumbnailQuality: 100,
|
||||||
trailerQuality: 480,
|
trailerQuality: [480, 540],
|
||||||
limit: 25, // max number of photos per release
|
limit: 25, // max number of photos per release
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -290,9 +290,11 @@ async function storeTrailer(trailers, {
|
||||||
}, label) {
|
}, label) {
|
||||||
// support scrapers supplying multiple qualities
|
// support scrapers supplying multiple qualities
|
||||||
const trailer = Array.isArray(trailers)
|
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;
|
: trailers;
|
||||||
|
|
||||||
|
console.log(trailer);
|
||||||
|
|
||||||
if (!trailer || !trailer.src) {
|
if (!trailer || !trailer.src) {
|
||||||
logger.info(`No trailer available for ${label}`);
|
logger.info(`No trailer available for ${label}`);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue