mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
#角色 character-img增加对jpeg格式的图片识别
This commit is contained in:
parent
db67f380fd
commit
5613993879
@ -39,7 +39,7 @@ class Character extends Base {
|
|||||||
|
|
||||||
let list = {};
|
let list = {};
|
||||||
let imgs = fs.readdirSync(charImgPath);
|
let imgs = fs.readdirSync(charImgPath);
|
||||||
imgs = imgs.filter((img) => /\.(png|jpg|webp)/i.test(img));
|
imgs = imgs.filter((img) => /\.(png|jpg|webp|jpeg)/i.test(img));
|
||||||
|
|
||||||
lodash.forEach(imgs, (img) => {
|
lodash.forEach(imgs, (img) => {
|
||||||
list[img] = `character-img/${name}/${img}`
|
list[img] = `character-img/${name}/${img}`
|
||||||
@ -53,7 +53,7 @@ class Character extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
imgs = fs.readdirSync(charImgPlusPath);
|
imgs = fs.readdirSync(charImgPlusPath);
|
||||||
imgs = imgs.filter((img) => /\.(png|jpg|webp)/i.test(img));
|
imgs = imgs.filter((img) => /\.(png|jpg|webp|jpeg)/i.test(img));
|
||||||
|
|
||||||
lodash.forEach(imgs, (img) => {
|
lodash.forEach(imgs, (img) => {
|
||||||
list[img] = `miao-res-plus/character-img/${name}/${img}`
|
list[img] = `miao-res-plus/character-img/${name}/${img}`
|
||||||
|
Loading…
Reference in New Issue
Block a user