mirror of
https://github.com/misskey-dev/summerflare.git
synced 2025-05-06 22:27:31 +09:00
fix: missing thumbnail in Amazon Link
This commit is contained in:
parent
1664e9fb16
commit
60507c3a88
@ -14,7 +14,7 @@ import getSensitive from "../general/sensitive";
|
|||||||
export default function amazon(url: URL, html: HTMLRewriter) {
|
export default function amazon(url: URL, html: HTMLRewriter) {
|
||||||
const card = getCard(url, html);
|
const card = getCard(url, html);
|
||||||
const title = getTitle(url, html);
|
const title = getTitle(url, html);
|
||||||
const image = getImage(url, html);
|
const thumbnail = getImage(url, html);
|
||||||
const player = Promise.all([
|
const player = Promise.all([
|
||||||
card,
|
card,
|
||||||
getPlayerUrlGeneral(url, html),
|
getPlayerUrlGeneral(url, html),
|
||||||
@ -44,14 +44,14 @@ export default function amazon(url: URL, html: HTMLRewriter) {
|
|||||||
|
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
title,
|
title,
|
||||||
image,
|
thumbnail,
|
||||||
player,
|
player,
|
||||||
description,
|
description,
|
||||||
siteName,
|
siteName,
|
||||||
favicon,
|
favicon,
|
||||||
sensitive,
|
sensitive,
|
||||||
]).then(
|
]).then(
|
||||||
([title, image, player, description, siteName, favicon, sensitive]) => {
|
([title, thumbnail, player, description, siteName, favicon, sensitive]) => {
|
||||||
if (title === null) {
|
if (title === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -60,7 +60,7 @@ export default function amazon(url: URL, html: HTMLRewriter) {
|
|||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
title,
|
title,
|
||||||
image,
|
thumbnail,
|
||||||
description: title === description ? null : description,
|
description: title === description ? null : description,
|
||||||
player,
|
player,
|
||||||
allow: [],
|
allow: [],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user