优化切歌逻辑
parent
1cee2febf4
commit
b820adf0bf
|
@ -517,14 +517,17 @@ export default {
|
||||||
if (this.setting.player.togglePlayMethod == 'random' && this.playedList.length) {
|
if (this.setting.player.togglePlayMethod == 'random' && this.playedList.length) {
|
||||||
let index = this.playedList.indexOf(this.targetSong)
|
let index = this.playedList.indexOf(this.targetSong)
|
||||||
index -= 1
|
index -= 1
|
||||||
if (index > -1) {
|
while (true) {
|
||||||
let listIndex = this.list.indexOf(this.playedList[index])
|
if (index > -1) {
|
||||||
if (listIndex < 0) {
|
let listIndex = this.list.indexOf(this.playedList[index])
|
||||||
this.removePlayedList(index)
|
if (listIndex < 0) {
|
||||||
return this.handlePrev()
|
this.removePlayedList(index)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
this.setPlayIndex(listIndex)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
this.setPlayIndex(listIndex)
|
break
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let list = await this.filterList()
|
let list = await this.filterList()
|
||||||
|
@ -552,14 +555,17 @@ export default {
|
||||||
if (this.setting.player.togglePlayMethod == 'random' && this.playedList.length) {
|
if (this.setting.player.togglePlayMethod == 'random' && this.playedList.length) {
|
||||||
let index = this.playedList.indexOf(this.targetSong)
|
let index = this.playedList.indexOf(this.targetSong)
|
||||||
index += 1
|
index += 1
|
||||||
if (index < this.playedList.length) {
|
while (true) {
|
||||||
let listIndex = this.list.indexOf(this.playedList[index])
|
if (index < this.playedList.length) {
|
||||||
if (listIndex < 0) {
|
let listIndex = this.list.indexOf(this.playedList[index])
|
||||||
this.removePlayedList(index)
|
if (listIndex < 0) {
|
||||||
return this.handleNext()
|
this.removePlayedList(index)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
this.setPlayIndex(listIndex)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
this.setPlayIndex(listIndex)
|
break
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let list = await this.filterList()
|
let list = await this.filterList()
|
||||||
|
|
Loading…
Reference in New Issue