优化英文歌曲名匹配
parent
82d1ac1e83
commit
0701b78720
|
@ -70,8 +70,9 @@ export default {
|
||||||
const listMap = new Map()
|
const listMap = new Map()
|
||||||
const duplicateList = []
|
const duplicateList = []
|
||||||
this.listInfo.list.forEach((musicInfo, index) => {
|
this.listInfo.list.forEach((musicInfo, index) => {
|
||||||
if (listMap.has(musicInfo.name)) {
|
const musicInfoName = musicInfo.name.toLowerCase().trim()
|
||||||
const targetMusicInfo = listMap.get(musicInfo.name)
|
if (listMap.has(musicInfoName)) {
|
||||||
|
const targetMusicInfo = listMap.get(musicInfoName)
|
||||||
duplicateList.push({
|
duplicateList.push({
|
||||||
index: this.listInfo.list.indexOf(targetMusicInfo),
|
index: this.listInfo.list.indexOf(targetMusicInfo),
|
||||||
musicInfo: targetMusicInfo,
|
musicInfo: targetMusicInfo,
|
||||||
|
@ -80,7 +81,7 @@ export default {
|
||||||
musicInfo,
|
musicInfo,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
listMap.set(musicInfo.name, musicInfo)
|
listMap.set(musicInfoName, musicInfo)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue