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()