forked from um/web
Fix parsing picture in metadata
This commit is contained in:
parent
9416ded167
commit
bd377db39b
@ -66,9 +66,10 @@ async function Decrypt(file) {
|
|||||||
const filename = artist + " - " + title + "." + new_ext;
|
const filename = artist + " - " + title + "." + new_ext;
|
||||||
// 处理无封面
|
// 处理无封面
|
||||||
let pic_url = "";
|
let pic_url = "";
|
||||||
if (tag.tags.picture !== undefined) {
|
if (tag.common.picture !== undefined && tag.common.picture.length >= 1) {
|
||||||
let pic = new Blob([new Uint8Array(tag.tags.picture.data)], {type: tag.tags.picture.format});
|
const picture = tag.common.picture[0];
|
||||||
pic_url = URL.createObjectURL(pic);
|
const blobPic = new Blob([picture.data], {type: picture.format});
|
||||||
|
pic_url = URL.createObjectURL(blobPic);
|
||||||
}
|
}
|
||||||
// 返回
|
// 返回
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user