unburn/musicard

non support image type

KBYSHanahira opened this issue · 6 comments

Console Log

https://i.ytimg.com/vi_webp/mpWnhkMLIu4/maxresdefault.webp

Error

/home/hanahiranetwork/Desktop/DiscordBOT/HimawariChan/node_modules/canvas/lib/image.js:94
SetSource.call(img, src)
^

Error: Unsupported image type
at setSource (/home/hanahiranetwork/Desktop/DiscordBOT/HimawariChan/node_modules/canvas/lib/image.js:94:13)
at /home/hanahiranetwork/Desktop/DiscordBOT/HimawariChan/node_modules/canvas/lib/image.js:62:11
at /home/hanahiranetwork/Desktop/DiscordBOT/HimawariChan/node_modules/simple-get/index.js:97:7
at IncomingMessage. (/home/hanahiranetwork/Desktop/DiscordBOT/HimawariChan/node_modules/simple-concat/index.js:8:13)
at Object.onceWrapper (node:events:628:28)
at IncomingMessage.emit (node:events:526:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

i fix this by set the picture to default

let imageurl;

    if (song.thumbnail.includes(".webp")) {
      imageurl = "";
    } else {
      imageurl = song.thumbnail;
    }

i wait fix this to support webp file

Thanks @KBYSHanahira
We have fixed the bug, check out latest release here

@flam3face
Thanks you fixed this <3
I wait you update support file [ .webp ] or [ other picture file type ] can show in music card like the .png and .jpegs in future
if can't not problem you doing good

canvas doesn't load .webp images, still i will try to resolve it.

@flam3face Thank you very much :)
music card is very good , i love it <3

@KBYSHanahira fixed the issue, now you can use webp as well