mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-02-12 23:15:00 +08:00
导入收藏时,更新收藏项的源站信息
This commit is contained in:
@@ -335,6 +335,11 @@ export default {
|
||||
result.filePaths.forEach(file => {
|
||||
var str = fs.readFileSync(file)
|
||||
const json = JSON.parse(str)
|
||||
json.forEach(ele => {
|
||||
if (ele.site === undefined) {
|
||||
ele.site = this.sites.find(x => x.key === ele.key)
|
||||
}
|
||||
})
|
||||
star.bulkAdd(json).then(e => {
|
||||
this.getFavorites()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user