queue-index-vs-shuffle-space
Installation
SKILL.md
Queue index vs shuffle space
A media engine holds items in timeline order — the order you added them. When shuffle is on it plays them in a shuffled order, which is a permutation stored separately. Anything the engine reports as "current index" is in timeline space. Anything a list on screen shows is in play order. They are equal only while shuffle is off, which is why this bug ships.
The fix has two halves, both at the player layer, never in the list composable:
- Publish the current index from the track-change callback, not only from queue mutations.
- Expose both directions of the permutation and convert by position — never by matching ids.