Compare commits

...

2 Commits

Author SHA1 Message Date
08612e431b asdf 2024-09-05 20:35:10 -07:00
b3109968cf wait what? 2024-09-05 20:24:07 -07:00
2 changed files with 3 additions and 6 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/${data.videoId}/mqdefault.jpg`, url: `https://i.ytimg.com/vi/${video.id}/mqdefault.jpg`,
width: 320, width: 320,
height: 180 height: 180
}; };

View File

@ -41,10 +41,7 @@ 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 { return canvas.toBuffer("image/png");
imagesheet: canvas.toBuffer("image/png"),
images
};
} }
export async function makeImageSheetVrcUrl(pool, images, legacyMode) { export async function makeImageSheetVrcUrl(pool, images, legacyMode) {
@ -64,5 +61,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}`])?.imagesheet; return await store[`${pool}:${num}`];
} }