Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 3b81843

Browse files
committed
Don't skip immediate song if queue is empty
Signed-off-by: Ovenoboyo <[email protected]>
1 parent c5a854b commit 3b81843

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/utils/ui/mixins/PlayerControls.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ export default class PlayerControls extends Vue {
4747
}
4848

4949
public async playTop(songs: Song[]) {
50+
console.log(songs.map((val) => val.title))
5051
if (this.isSyncing) {
51-
await vxm.sync.pushInQueue({ item: songs.slice(), top: true, skipImmediate: true })
52+
await vxm.sync.pushInQueue({ item: songs.slice(), top: true, skipImmediate: vxm.sync.queueOrder.length > 0 })
5253
} else {
53-
await vxm.player.pushInQueue({ item: songs.slice(), top: true, skipImmediate: true })
54+
await vxm.player.pushInQueue({ item: songs.slice(), top: true, skipImmediate: vxm.player.queueOrder.length > 0 })
5455
}
5556

5657
if (!this.isSyncing) vxm.player.playAfterLoad = true

0 commit comments

Comments
 (0)