parrot: Concurrent playlist queuing causes out-of-order queue
Description
When multiple people are using a /play command with playlists, the tracks are added as soon as they are processed, which means the original order of the playlists isn’t preserved.
Expected vs. Observed
| - | - |
|---|---|
| Expected | The queued playlists are queued one after the other, in the order they were called. |
| Observed | Playlists are queued in an interleaved way. |
Repro Steps
- Use
/play endwith a playlist. - Use
/play endwith a playlist very quickly after the previous one. - Use
/queue.
Environment
| Key | Value |
|---|---|
| Operating System | Ubuntu 21.10 impish |
| Kernel | x86_64 Linux 5.13.0-28-generic |
| CPU | Intel Core i5-6500 @ 4x 3,6GHz |
| RAM | 15893MiB |
Screens

About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 15 (8 by maintainers)
That would be a great idea! In fact, most bots I have used before were really fast at queueing tracks. The one I ran before only downloaded metadata for queueing purposes, and only downloaded the track when playing (in fact, a lot of times it errored out because it wasn’t able to play it).
@danrpinho this would block everything, meaning while you queue 100 songs, for about, I don’t know, 2 minutes, you can’t use ANY command, like /queue /np and what not. This is absolutely not great.
We would need to implement our own queueing system or separate thread that then enqueues it. Seems we are over-engineering it for a not-so-common use case that is not that shocking. In fact, we should probably look into speeding up the enqueueing system itself 😄
I don’t really agree with it being expected behaviour. Visualising this in another way, if I wanted to insert two bags of marbles (playlists) in a tube (the queue) I’d expect that all marbles in the first bag would be inside of the tube before the first marble of the second bag entered. If I wanted to mix the songs in the two playlists, I could use
/shuffleto get that effect.From a UX perspective, I don’t find being unable to use other queue-based commands as a bad thing if we provide enough feedback to the user. A message saying “adding songs to queue” when a playlist past a certain size threshold could be enough in my opinion. Are there any other reasons as to why these commands should be available 100% of the time?