新增设置-其他-列表缓存信息清理功能

This commit is contained in:
lyswhut
2021-02-02 15:08:07 +08:00
parent 70d24ffdfd
commit f9cbf9254c
6 changed files with 54 additions and 18 deletions
+12
View File
@@ -205,6 +205,18 @@ const mutations = {
targetList.list.splice(sortNum - 1, 0, ...musicInfos)
},
clearCache() {
const lists = Object.values(allList)
for (const { list } of lists) {
for (const item of list) {
if (item.otherSource) item.otherSource = null
if (item.typeUrl['128k']) delete item.typeUrl['128k']
if (item.typeUrl['320k']) delete item.typeUrl['320k']
if (item.typeUrl.flac) delete item.typeUrl.flac
if (item.typeUrl.wav) delete item.typeUrl.wav
}
}
},
}
export default {