Fixed ManyVids quality not accounting for vertical video, discount returned even if it isn't on sale.
This commit is contained in:
@@ -49,7 +49,8 @@ async function scrapeScene(data, context) {
|
||||
|
||||
release.attributes = {
|
||||
price: data.price?.regular,
|
||||
discount: data.price?.discountedPrice,
|
||||
discount: data.price?.onSale ? data.price.discountedPrice : null, // reported as "0" when not on sale
|
||||
isFree: data.price?.free,
|
||||
isCustomOrder: data.isCustomOrder,
|
||||
isPremium: data.isPremium,
|
||||
isPrivate: data.isPrivate,
|
||||
@@ -88,7 +89,8 @@ async function scrapeScene(data, context) {
|
||||
release.trailer = await getTrailer(data.id);
|
||||
}
|
||||
|
||||
release.qualities = [data.height].filter(Boolean);
|
||||
// the shortest side, so vertical videos aren't reported as 1920p
|
||||
release.qualities = [data.width && data.height ? Math.min(data.width, data.height) : data.height].filter(Boolean);
|
||||
|
||||
return release;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user