Balanced song request queue

On smaller channels I see that some regulars dump their song requests and they will be played as they come in.

So 2 users might dump 10 song requests each, so the queue has something to play but if a third, possibly new, user comes in and requests one song, they will have to wait for a while…

This could be mitigated by limiting the song requests of any user, but that might leave the song request list coming short…

Anyway, my idea would be to have the song requests form a queue, not only by who requests first, but also by alternating users.

example:
user a, b, c and d

imagine one song is playing for 5 minutes and during that time (to simplify the example) 9 requests come in.
requests are made in this chronological order:

  1. user a
  2. user a
  3. user b
  4. user a
  5. user a
  6. user c
  7. user b
  8. user c
  9. user d

the resulting playlist order will end up being:

    1. user a
    1. user b
    1. user c
    1. user d
    1. user a
    1. user b
    1. user c
    1. user a
    1. user a

Its kinda fair for those who make few requests… no?

If there were an API call to modify the position of Queue Item Ressources I would implement it manually somehow…

Thank you for reading & considering.

The night bot api happens to have just what you are looking for.
https://api-docs.nightbot.tv/#promote-queue-item

Not really.

With that command you can put a queue item in front, in the first place, instead of having control over the position.

If I were to use that, each time a song request comes in, I will need to ‘sort’ the whole queue anew by sending the promote api call as many times as there are current queue items.

Because of that, it has the chance of race conditions waiting to happen when you have a long enough queue already, and one song requests is still reordering the list while a second song requests comes in and starts meddling with things.

It just doesn’t seem like a good idea at all.