fix(dearrow): don't replace thumbnail if only original available (#1959)

This commit is contained in:
Marvin Witt 2023-11-05 02:06:08 +01:00 committed by Nuckyz
parent 86e94343cc
commit 04d2dd26c4
No known key found for this signature in database
GPG Key ID: 440BF8296E1C4AD9

@ -63,7 +63,7 @@ async function embedDidMount(this: Component<Props>) {
embed.rawTitle = titles[0].title; embed.rawTitle = titles[0].title;
} }
if (thumbnails[0]?.votes >= 0) { if (thumbnails[0]?.votes >= 0 && thumbnails[0].timestamp) {
embed.dearrow.oldThumb = embed.thumbnail.proxyURL; embed.dearrow.oldThumb = embed.thumbnail.proxyURL;
embed.thumbnail.proxyURL = `https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${videoId}&time=${thumbnails[0].timestamp}`; embed.thumbnail.proxyURL = `https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${videoId}&time=${thumbnails[0].timestamp}`;
} }