mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-10 23:23:04 -04:00
forked!!
This commit is contained in:
parent
538b87062a
commit
ea7451bcdc
326 changed files with 24876 additions and 2280 deletions
|
@ -50,7 +50,7 @@ async function embedDidMount(this: Component<Props>) {
|
|||
const { titles, thumbnails } = await res.json();
|
||||
|
||||
const hasTitle = titles[0]?.votes >= 0;
|
||||
const hasThumb = thumbnails[0]?.votes >= 0 && !thumbnails[0].original;
|
||||
const hasThumb = thumbnails[0]?.votes >= 0;
|
||||
|
||||
if (!hasTitle && !hasThumb) return;
|
||||
|
||||
|
@ -58,12 +58,12 @@ async function embedDidMount(this: Component<Props>) {
|
|||
enabled: true
|
||||
};
|
||||
|
||||
if (hasTitle) {
|
||||
if (titles[0]?.votes >= 0) {
|
||||
embed.dearrow.oldTitle = embed.rawTitle;
|
||||
embed.rawTitle = titles[0].title.replace(/ >(\S)/g, " $1");
|
||||
}
|
||||
|
||||
if (hasThumb) {
|
||||
if (thumbnails[0]?.votes >= 0 && thumbnails[0].timestamp) {
|
||||
embed.dearrow.oldThumb = embed.thumbnail.proxyURL;
|
||||
embed.thumbnail.proxyURL = `https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${videoId}&time=${thumbnails[0].timestamp}`;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue