Added trailer support to Vogov. Set preferred trailer resolution to 480p. Added 480p and other resolution trailers support to XEmpire.

This commit is contained in:
2020-01-30 03:53:54 +01:00
parent 44c44cf9e6
commit c300d4d251
4 changed files with 145 additions and 11 deletions

View File

@@ -137,7 +137,7 @@ async function fetchPhoto(photoUrl, index, label, attempt = 1) {
logger.warn(`Failed attempt ${attempt}/3 to fetch photo ${index + 1} for ${label} (${photoUrl}): ${error}`);
if (attempt < 3) {
await Promise.delay(1000);
await Promise.delay(5000);
return fetchPhoto(photoUrl, index, label, attempt + 1);
}
@@ -290,7 +290,7 @@ async function storeTrailer(trailers, {
}, label) {
// support scrapers supplying multiple qualities
const trailer = Array.isArray(trailers)
? trailers.find(trailerX => [1080, 720].includes(trailerX.quality)) || trailers[0]
? trailers.find(trailerX => [config.media.trailerQuality, 480, 720, 1080].includes(trailerX.quality)) || trailers[0]
: trailers;
if (!trailer || !trailer.src) {