Compare commits

..

No commits in common. "08612e431bbe38ef6972ac823eb798d2262a8833" and "a9442bfa96a62dca1330b7559646bef1ab3e759a" have entirely different histories.

2 changed files with 6 additions and 3 deletions

View File

@ -62,7 +62,7 @@ async function VRCYoutubeSearch(pool, query, options = {}) {
}; };
else { else {
video.thumbnail ||= { video.thumbnail ||= {
url: `https://i.ytimg.com/vi/${video.id}/mqdefault.jpg`, url: `https://i.ytimg.com/vi/${data.videoId}/mqdefault.jpg`,
width: 320, width: 320,
height: 180 height: 180
}; };

View File

@ -41,7 +41,10 @@ async function createImageSheet(images /*[{width, height, url}]*/, legacyMode) {
ctx.drawImage(image, x, y, w, h); ctx.drawImage(image, x, y, w, h);
})().catch(error => console.error("imageload", error.stack)))); })().catch(error => console.error("imageload", error.stack))));
return canvas.toBuffer("image/png"); return {
imagesheet: canvas.toBuffer("image/png"),
images
};
} }
export async function makeImageSheetVrcUrl(pool, images, legacyMode) { export async function makeImageSheetVrcUrl(pool, images, legacyMode) {
@ -61,5 +64,5 @@ export async function makeImageSheetVrcUrl(pool, images, legacyMode) {
} }
export async function getImageSheet(pool, num) { export async function getImageSheet(pool, num) {
return await store[`${pool}:${num}`]; return (await store[`${pool}:${num}`])?.imagesheet;
} }