While playing items through the Web App, the current play index is not updated when a previously played item is removed from the Play Queue. The next expected item is skipped.
It appears the current play queue item index is not updated after removing an item which came before it (having an ID < current ID).
Thus when the next item is selected, it increments the current (old) index by 1 and looks up the new index in the updated (smaller) list.
When the current item being played is second to last (n-1) and a previous item is removed, the "Next Item" arrow disappears as though there are no other items to play (which is not true).
- A play queue contains 9 songs (with IDs 1 through 9). While listening to the forth song (ID:4), the user clicks the "Remove" circle on the second and third song (ID:2 and ID:3 respectfully).
Then when the current song concludes (or the user clicks the "Next Item" arrow) the next song to play is song with ID:7 (instead of the expected song with ID:5).
- A play queue contains 3 songs (with IDs 1 through 3). While listening to the second song (ID:2), the user clicks the "Remove" circle on the first song (ID:1).
Then the "Next Item" arrow disappears, even though song with ID:3 remains.
Emby Server Version: 220.127.116.11
Emby Web: 18.104.22.168
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
A possible solution to attempt first is to call 'refreshPlaylistIndex' from the 'PlayQueueManager.prototype.removeFromPlaylist' function within playqueuemanager.js