forked from DebaucheryLibrarian/traxxx
Moved all preferred resolutions to config.
This commit is contained in:
parent
d9623789bd
commit
0b4a1a5232
|
@ -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
|
||||
},
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue