导出歌单移除换源信息

pull/453/head
lyswhut 2021-01-28 14:09:22 +08:00
parent 2a74abdef4
commit 006da66028
1 changed files with 12 additions and 2 deletions

View File

@ -719,13 +719,18 @@ export default {
}
},
exportPlayList(path) {
const data = {
const data = JSON.parse(JSON.stringify({
type: 'playList',
data: [
this.defaultList,
this.loveList,
...this.userList,
],
}))
for (const list of data.data) {
for (const item of list.list) {
if (item.otherSource) delete item.otherSource
}
}
this.handleSaveFile(path, JSON.stringify(data))
},
@ -750,7 +755,7 @@ export default {
}
},
async exportAllData(path) {
let allData = {
let allData = JSON.parse(JSON.stringify({
type: 'allData',
setting: Object.assign({ version: this.settingVersion }, this.setting),
playList: [
@ -758,6 +763,11 @@ export default {
this.loveList,
...this.userList,
],
}))
for (const list of allData.playList) {
for (const item of list.list) {
if (item.otherSource) delete item.otherSource
}
}
this.handleSaveFile(path, JSON.stringify(allData))
},