From aa8b4b527dd3d3485f32bb60ec4a0d9d1d90342d Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Sun, 21 Feb 2021 23:03:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8E=86=E5=8F=B2=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E5=AF=BC=E5=85=A5m3u8List?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/History.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/History.vue b/src/components/History.vue index bda8646..f6854ce 100644 --- a/src/components/History.vue +++ b/src/components/History.vue @@ -280,7 +280,12 @@ export default { result.filePaths.forEach(file => { const str = fs.readFileSync(file) const json = JSON.parse(str) - json.forEach(record => { if (record.detail.m3u8List) record.detail.fullList = [].concat(record.detail.m3u8List) }) + json.forEach(record => { + if (record.detail && record.detail.m3u8List) { + record.detail.fullList = [].concat({ flag: 'm3u8', list: record.detail.m3u8List }) + delete record.detail.m3u8List + } + }) history.bulkAdd(json).then(res => { this.$message.success('导入成功') this.getAllhistory()