From 04dd96684ef60796147b2eac832c047c26364840 Mon Sep 17 00:00:00 2001 From: xhacker-zzz <959220793@qq.com> Date: Tue, 22 Nov 2022 06:59:35 +0800 Subject: [PATCH] Fix Bugs --- src/view/Home.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/view/Home.vue b/src/view/Home.vue index 4aa1c30..69a6f5d 100644 --- a/src/view/Home.vue +++ b/src/view/Home.vue @@ -157,9 +157,12 @@ export default { let notifyMsg = '成功修改 ' + this.editing_data.title; try { const musicMeta = await metaParseBlob(new Blob([this.editing_data.blob], { type: mime })); - const imageInfo = await GetImageFromURL(this.editing_data.picture); - if (!imageInfo) { - console.warn('获取图像失败', this.editing_data.picture); + let imageInfo = undefined; + if (this.editing_data.picture !== '') { + imageInfo = await GetImageFromURL(this.editing_data.picture); + if (!imageInfo) { + console.warn('获取图像失败', this.editing_data.picture); + } } const newMeta = { picture: imageInfo?.buffer, title: data.title, @@ -176,7 +179,7 @@ export default { this.editing_data.blob = new Blob([RewriteMetaToFlac(buffer, newMeta, musicMeta)], { type: mime }); } else { writeSuccess = undefined; - notifyMsg = info.ext + '类型文件暂时不支持修改音乐标签'; + notifyMsg = this.editing_data.ext + '类型文件暂时不支持修改音乐标签'; } } catch (e) { writeSuccess = false;