mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-05-05 13:02:14 +08:00
修复历史兼容导入m3u8List
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user