Skip to content

Muse thinks nothing is currently playing except it's wrong #1265

@Mubelotix

Description

@Mubelotix

Steps to reproduce:

  • /play "Kraftwerk - Computerworld (Full Album)"
  • /play "Kraftwerk - Computerworld (Full Album)"
  • /next
  • /now-playing

Image

Cause:
When forward is called in player.ts, it seems the player becomes idle while the next song is loading, and this result in forward being called a second time in onAudioPlayerIdle

Fix:

async forward(skip: number): Promise<void> {
    this.manualForward(skip);

    try {
      if (this.getCurrent() && this.status !== STATUS.PAUSED) {
        let oldStatus = this.status; // NEW
        this.status = STATUS.IDLE; // NEW
        await this.play();
        this.status = oldStatus; // NEW
      } else {

I won't do a PR here cause I fixed it in my fork already

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions