Jump to content

Current play index is not updated when previous item is removed


mard
 Share

Recommended Posts

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).


Examples:

  1. 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).
  2. 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.

 

Versions/Clients:

Emby Server Version: 4.3.0.26
Emby Web: 4.3.0.26
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

 

Suggestions:

A possible solution to attempt first is to call 'refreshPlaylistIndex' from the 'PlayQueueManager.prototype.removeFromPlaylist' function within playqueuemanager.js

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...