Jump to content


Photo
- - - - -

Current play index is not updated when previous item is removed

Play Queue Playlist Web App

  • Please log in to reply
5 replies to this topic

#1 mard OFFLINE  

mard

    Newbie

  • Members
  • 3 posts
  • Local time: 01:54 PM

Posted 25 November 2019 - 08:23 PM

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



#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153457 posts
  • Local time: 03:54 PM

Posted 26 November 2019 - 04:34 AM

Hi @mard, yes great catch, thanks !



#3 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153457 posts
  • Local time: 03:54 PM

Posted 27 November 2019 - 11:03 AM

Are you a software developer?



#4 mard OFFLINE  

mard

    Newbie

  • Members
  • 3 posts
  • Local time: 01:54 PM

Posted 27 November 2019 - 06:48 PM

Are you a software developer?

 

Yes, I'm a software engineer.
How could you tell?  :)



#5 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153457 posts
  • Local time: 03:54 PM

Posted 28 November 2019 - 03:30 PM

What tech are skilled with?



#6 mard OFFLINE  

mard

    Newbie

  • Members
  • 3 posts
  • Local time: 01:54 PM

Posted 29 November 2019 - 05:20 PM

<< Removed >>


Edited by mard, 06 December 2019 - 08:34 PM.






Also tagged with one or more of these keywords: Play Queue, Playlist, Web App

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users