Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Session] キューの順番がおかしい #81

Closed
p1ass opened this issue Jun 16, 2020 · 0 comments · Fixed by #87
Closed

[Session] キューの順番がおかしい #81

p1ass opened this issue Jun 16, 2020 · 0 comments · Fixed by #87
Assignees
Labels
bug Something isn't working

Comments

@p1ass
Copy link
Member

p1ass commented Jun 16, 2020

概要

既に「次に再生される曲」に曲が詰まれてある状態でセッションを開始すると、 1曲目は新規の曲が再生されるが、残りのキューの曲は「次に再生される曲」の後に再生されてしまう。

再現方法

  1. セッションを作成する
  2. 2曲追加する (適当な数で良い) (A,Bとする)
  3. 再生を始める
  4. 曲を追加する(C)とする

このとき曲の順番は
A,C,Bとなってしまう。

ログ

<img src="https://user-images.githubusercontent.com/30015728/84969626-0b1c6180-b154-11ea-8dfa-6fa671605c66.png" width="300px")

対処方法

  • PlayWithTracks() で曲を追加すると、1曲目が「再生中」、それ以降が「再生待ち」に追加される
  • AddToQueue() で追加すると「次に再生される曲」に追加される

優先度は「次に再生される曲」の方が高いので、AddToQueue の方が先に読まれてしまう。

PlayWithTracks() の中で

  • 1曲だけPlay() で再生中にする
  • 残りはAddToQueue でキューに追加

する実装に変更する

@p1ass p1ass added the bug Something isn't working label Jun 16, 2020
@p1ass p1ass changed the title [Session] 既に「次に再生される曲」があると、正しくキューを詰めない [Session] あるセッションで再生中に別のセッションを開始すると、キューがおかしくなる Jun 16, 2020
@p1ass p1ass changed the title [Session] あるセッションで再生中に別のセッションを開始すると、キューがおかしくなる [Session] キューの順番がおかしい Jun 16, 2020
@p1ass p1ass self-assigned this Jun 17, 2020
@p1ass p1ass closed this as completed in #87 Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant