Skip to content

Commit

Permalink
fix: instead of adding the music that just started, we add the next m…
Browse files Browse the repository at this point in the history
…usic
  • Loading branch information
MAXOUXAX committed Mar 11, 2024
1 parent 15b1454 commit e5fa255
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/src/RoomStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export default class RoomStorage {
let nextTrack = room.getQueue().at(0);

if (nextTrack?.url === newPlaybackState.url) {
nextTrack = room.shiftQueue();
room.shiftQueue();
nextTrack = room.getQueue().at(0);
}
if (!nextTrack) return console.log("No more tracks in the queue");

Expand Down

0 comments on commit e5fa255

Please sign in to comment.