Fix calling createTrack multiple times when radio track changes
This commit is contained in:
parent
c828e106b0
commit
f06464ffa2
7 changed files with 35 additions and 18 deletions
|
|
@ -235,6 +235,12 @@ export const useQueue = createGlobalState(() => {
|
|||
return date
|
||||
}))
|
||||
|
||||
// Clear
|
||||
const clear = () => {
|
||||
store.commit('radios/reset')
|
||||
tracks.value.length = 0
|
||||
}
|
||||
|
||||
// Radio queue populating
|
||||
watchEffect(() => {
|
||||
if (store.state.radios.running && currentIndex.value === tracks.value.length - 1) {
|
||||
|
|
@ -260,6 +266,7 @@ export const useQueue = createGlobalState(() => {
|
|||
shuffle,
|
||||
reshuffleUpcomingTracks,
|
||||
reorder,
|
||||
endsIn
|
||||
endsIn,
|
||||
clear
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue