Fixed media duplicate fallbacks being ignored.
This commit is contained in:
parent
b4c0b9f8eb
commit
a96680875c
|
@ -93,7 +93,7 @@ async function findDuplicates(photos, identifier, prop = null, label) {
|
||||||
|
|
||||||
const originals = photos.filter((source) => {
|
const originals = photos.filter((source) => {
|
||||||
if (Array.isArray(source)) {
|
if (Array.isArray(source)) {
|
||||||
return !source.some(sourceX => !duplicateLookup.has((prop && sourceX[prop]) || (sourceX.src && sourceX)));
|
return !source.some(sourceX => duplicateLookup.has((prop && sourceX[prop]) || (sourceX.src && sourceX)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return !duplicateLookup.has((prop && source[prop]) || (source.src && source));
|
return !duplicateLookup.has((prop && source[prop]) || (source.src && source));
|
||||||
|
|
|
@ -82,11 +82,11 @@ async function scrapeScene(html, url) {
|
||||||
const durationEl = qa('value').find(el => /\d{1,3}:\d{2}/.test(el.textContent));
|
const durationEl = qa('value').find(el => /\d{1,3}:\d{2}/.test(el.textContent));
|
||||||
release.duration = ql(durationEl);
|
release.duration = ql(durationEl);
|
||||||
|
|
||||||
|
release.poster = qp('video'); // _800.jpg is larger than _xl.jpg in landscape
|
||||||
const photosUrl = qu('a[href*=photos]');
|
const photosUrl = qu('a[href*=photos]');
|
||||||
|
|
||||||
if (photosUrl) {
|
if (photosUrl) {
|
||||||
release.photos = await fetchPhotos(photosUrl);
|
release.photos = await fetchPhotos(photosUrl);
|
||||||
release.poster = qp('video'); // _800.jpg is larger than _xl.jpg in landscape
|
|
||||||
} else {
|
} else {
|
||||||
release.photos = qis('img[src*=ThumbNails]');
|
release.photos = qis('img[src*=ThumbNails]');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue